cf/mirror

Deduction Queries

CF
1044D2400· grandmaster2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
12
2 1 2
2 1 1073741822
1 0 3 4
2 0 0
2 3 3
2 0 3
1 6 7 3
2 4 4
1 0 2 1
2 0 0
2 4 4
2 0 0
Output
-1
-1
-1
-1
5
-1
6
3
5
Sample 2of 2
Input
4
1 5 5 9
1 6 6 5
1 6 5 10
2 6 5
Output
12
1044D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…