cf/mirror

How Many Paths?

CF
1547G2100· master4s512 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
5
 
6 7
1 4
1 3
3 4
4 5
2 1
5 5
5 6
 
1 0
 
3 3
1 2
2 3
3 1
 
5 0
 
4 4
1 2
2 3
1 4
4 3
Output
1 0 1 2 -1 -1
1
-1 -1 -1
1 0 0 0 0
1 1 2 1
1547G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…