cf/mirror

Design Tutorial: Change the Goal

CF
472F2700· international gm2s256 MB⌨ stdin/stdout

Examples

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