cf/mirror

Graph Decomposition

CF
1170G6s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
6 9
1 2
2 3
1 3
2 4
2 5
4 5
3 5
3 6
5 6
Output
YES
3
4 2 5 4 2
4 3 6 5 3
4 1 3 2 1
Sample 2of 3
Input
4 7
1 1
1 2
2 3
3 4
4 1
1 3
1 3
Output
YES
3
2 1 1
5 1 4 3 2 1
3 1 3 1
Sample 3of 3
Input
4 8
1 1
1 2
2 3
3 4
4 1
2 4
1 3
1 3
Output
NO
1170G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…