P3022 [USACO11OPEN] Odd degrees G
Description
The cows are being invaded! Their republic comprises N (1
Input Format
\* Line 1: Two space-separated integers: N and M
\* Lines 2..M+1: Line i+1 contains two space-separated integers: A\_i and B\_i
Output Format
\* Line 1: A single integer that is the number of paths to keep. If no subset exists output only a single line with the integer -1.
\* Lines 2..K+1: Each line contains an index of an path to keep, in the range 1..M. These indices must be pairwise distinct.
Explanation/Hint
感谢@cn:苏卿念 提供的Special Judge