cf/mirror

Synchrophasotron

CF
68C2200· master3s256 MB⌨ stdin/stdout

Examples

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