Problem A Cloud System: Time Limit: Mem Limit
Problem A Cloud System: Time Limit: Mem Limit
Programming Contest
University of Science, VNU-HCM
December 06th, 2021
Problem A
Cloud System
Time Limit: 3 seconds
Mem limit: 512 Megabytes
Ho Chi Minh University of Science has just build a new cloud computing system to run
experiences of their research related of deep-learning.
The system consists of N servers (numbered 1to N ). Each pair of servers are connected by at
most 1cable (possibly 0 ).
The cable connecting server u and server v has the transmitting capacity of C u ,v megabits per
nanosecond.
Let's define F u,v the data transfer rate between server u and server v . To transfer data from server
u to server v , the data can be splitted into multi parts and transfer via multiple routes.
For example, to transfer data from server 1 to server 4, data can be split
into 3 parts and transferred via 3 following routes:
1 - 4 (30 Mb per nanosecond)
1 - 3 - 4 (20 Mb per nanosecond)
1 - 2 - 4 (10 Mb per nanosecond)
so the transfer rate from 1 to 4 is 60 Mb per nanosecond or F =60 .
1,4
You are given the configuration of the network and the capacity of the cables, your task is to
compute F .
Input
The input starts with T - the number of test cases. Then T test cases follow.
Each test case starts with N the number of servers in the network ( N ≤200 ).
In the next N lines, each line contains N integers C u,v (0≤Cuv≤10000).
Output
For the t th test case, print "Case #t:". The next N lines, print the N × N matrix F .