cf/mirror

Sofia and the Lost Operations

CF
1980C1300· pupil2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
7
3
1 2 1
1 3 2
4
1 3 1 2
4
1 2 3 5
2 1 3 5
2
2 3
5
7 6 1 10 10
3 6 1 11 11
3
4 3 11
4
3 1 7 8
2 2 7 10
5
10 3 2 2 1
5
5 7 1 7 9
4 10 1 2 9
8
1 1 9 8 7 2 10 4
4
1000000000 203 203 203
203 1000000000 203 1000000000
2
203 1000000000
1
1
1
5
1 3 4 5 1
Output
YES
NO
NO
NO
YES
NO
YES
1980C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)