cf/mirror

Berland and the Shortest Paths

CF
1005F2100· master5s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
4 4 3
1 2
2 3
1 4
4 3
Output
2
1110
1011
Sample 2of 3
Input
4 6 3
1 2
2 3
1 4
4 3
2 4
1 3
Output
1
101001
Sample 3of 3
Input
5 6 2
1 2
1 3
2 4
2 5
3 4
3 5
Output
2
111100
110110
1005F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…