cf/mirror

Koa and the Beach (Easy Version)

CF
1384B11900· candidate master1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
7
2 1 1
1 0
5 2 3
1 2 3 2 2
4 3 4
0 2 4 3
2 3 5
3 0
7 2 3
3 0 2 1 3 0 1
7 1 4
4 4 3 0 2 4 2
5 2 3
1 2 3 2 2
Output
Yes
No
Yes
Yes
Yes
No
No
1384B1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)