Berland SU Computer Network
847L2400· grandmaster2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
32:3,21:1-1:32:1,2
Output
22 12 3
Sample 2of 3
Input
54:2,5,3,41:4-1:1-2:5,34:4,5,2,14:2,1,3,51:3-3:4,2,1
Output
42 12 45 23 5
Sample 3of 3
Input
31:2-1:31:1-1:31:1-1:2
Output
-1
58%
847L.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…