cf/mirror

Construct an Array (Easy Version)

CF
2245D14s1024 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
1 1
1 1 1
1 1
2 1 1
2 3
1 1 1
1 1 2
1 2 2
2 3
1 1 1
1 2 2
2 1 2
3 6
1 1 1
1 1 2
1 1 3
2 2 2
2 2 3
2 3 3
3 6
2 1 1
1 1 2
2 2 3
1 3 3
1 2 2
2 1 3
Output
YES
0
YES
-1
YES
0 0
NO
YES
1 -1 -1
NO
2245D1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…