cf/mirror

Lenient Vertex Cover

CF
1680F2600· international gm5s512 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
4
6 5
1 3
2 4
3 4
3 5
4 6
4 6
1 2
2 3
3 4
1 4
1 3
2 4
8 11
1 3
2 4
3 5
4 6
5 7
6 8
1 2
3 4
5 6
7 8
7 2
4 5
1 2
2 3
3 4
1 3
2 4
Output
YES
001100
NO
YES
01100110
YES
0110
Sample 2of 3
Input
1
10 15
9 4
3 4
6 4
1 2
8 2
8 3
7 2
9 5
7 8
5 10
1 4
2 10
5 3
5 7
2 9
Output
YES
0101100100
Sample 3of 3
Input
1
10 19
7 9
5 3
3 4
1 6
9 4
1 4
10 5
7 1
9 2
8 3
7 3
10 9
2 10
9 8
3 2
1 5
10 7
9 5
1 2
Output
YES
1010000011
1680F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…