410211: GYM103984 G Прямоугольная ломаная

Memory Limit:512 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

time limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputExamplesG. time limit per test
2
2
1 1
2
1 1

2
1 2
2
3 3
Output
Yes
1 0
1 1
0 1
0 0
No
Input
2
4
1 1 1 1
4
1 1 1 1

3
2 1 1
3
2 1 1
Output
Yes
1 0
1 1
2 1
2 2
1 2
1 1
0 1
0 0
Yes
0 -2
2 -2
2 -1
1 -1
1 0
0 0
Input
2
4
1 4 1 2
4
3 4 5 12

4
1 2 3 6
2
1 3
Output
Yes
2 0
2 3
3 3
3 7
4 7
4 12
0 12
0 0
No

加入题单

上一题 下一题 算法标签: