408200: GYM103049 J Joint Excavation

Memory Limit:1024 MB Time Limit:4 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

J. Joint Excavationtime limit per test4 secondsmemory limit per test1024 megabytesinputstandard inputoutputstandard outputExamplesInput
3 2
3 1
2 1
Output
1 1
1 
2 
3 
Input
4 3
1 3
2 3
3 4
Output
2 1
1 3 
4 
2 
Input
7 7
1 2
2 3
4 2
2 5
4 5
6 7
7 2
Output
3 2
1 2 4 
6 7 
3 5 

加入题单

算法标签: