i think we should not worry about that, at least my solution doesn't.. wrote: If anyone win at 2 different rows(columns) same time

Code: Select all
2
3 6
2
5
4
1 2 20
2 3 10
3 4 15
4 5 20
5 6 10
6 1 10
4 6
2
3
4
5
1 2 20
2 3 10
3 4 15
4 5 20
5 6 10
6 1 10
Code: Select all
The integers i and j must appear in the output in the same order in which they appeared in the input and should be followed by the maximum cycle length (on the same line).
Code: Select all
#include <iostream.h>
Code: Select all
#include <iostream>
Code: Select all
asdma ... asdaskdj<...>...<...>...
qwe.......qweqe ...