I I U P C 2 0 0 6 |
|
Problem G: Going in Cycle!! |
|
Input: standard input Output: standard output |
|
|
|
You are given a weighted directed graph with n vertices and m edges. Each cycle in the graph has a weight, which equals to sum of its edges. There are so many cycles in the graph with different weights. In this problem we want to find a cycle with the minimum mean.
|
|
Input |
|
The first line of input gives the number of cases, N. N test cases follow. Each one starts with two numbers n and m. m lines follo |
uva11090 - Going in Cycle!!
最新推荐文章于 2024-05-18 18:52:27 发布