Berland and the Shortest Paths
1005F2100· master5s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
4 4 31 22 31 44 3
Output
211101011
Sample 2of 3
Input
4 6 31 22 31 44 32 41 3
Output
1101001
Sample 3of 3
Input
5 6 21 21 32 42 53 43 5
Output
2111100110110
58%
1005F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…