fork download
  1. # your code goes here
  2. cases=int(input())
  3. while(cases):
  4. cases=cases-1
  5. n,m= map( int, input().split() )
  6. arr1=set([int(x) for x in input().split()])
  7. arr2=set([int(x) for x in range(1,n+1)])
  8. arr3=list(arr2-arr1)
  9. for x in range(0,len(arr3)):
  10. if int(x)%2 ==0:
  11. print(arr3[int(x)],end=" ")
  12. print()
  13. for x in range(0,len(arr3)):
  14. if int(x)%2 !=0:
  15. print(arr3[int(x)],end=" ")
  16. print()
  17.  
  18.  
  19.  
Runtime error #stdin #stdout #stderr 0.01s 9992KB
stdin
3
6 3
2 4 1
3 2
3 2
8 2
3 8..
stdout
3 6 
5 
1 

stderr
Traceback (most recent call last):
  File "./prog.py", line 6, in <module>
  File "./prog.py", line 6, in <listcomp>
ValueError: invalid literal for int() with base 10: '8..'