cf/mirror

Jellyfish and Math

CF
1874B2400· grandmaster2s512 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
10
1 0 1 1 1
3 3 1 2 1
1 6 0 7 1
2 4 4 9 8
21 4 0 17 28
50 50 0 0 39
95 33 1 33 110
138 202 174 64 108
78 340 68 340 461
457 291 491 566 766
Output
1
-1
2
-1
-1
2
1
4
1
3
1874B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…