cf/mirror

Game with Cards

CF
1539E2500· grandmaster2.5s256 MB⌨ stdin/stdout

Examples

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