cf/mirror

NP-Hard Problem

CF
687A1500· specialist2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
4 2
1 2
2 3
Output
1
2
2
1 3
Sample 2of 2
Input
3 3
1 2
2 3
1 3
Output
-1
687A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…