QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#294386 | #4825. Even and Odd Combinations | ucup-team1631# | 0 | 0ms | 0kb | Python3 | 488b | 2023-12-30 13:16:46 | 2023-12-30 13:16:48 |
answer
from sys import stdin
input=lambda :stdin.readline()[:-1]
def solve():
n,k=map(int,input().split())
a=list(map(int,input().split()))
IN=[0]*(n+1)
for i in a:
IN[i]=1
ans=[]
if n%2==1:
for i in range(1,n+1):
if IN[i]==0:
ans.append(i)
else:
for i in range(1,n):
if IN[i]==0:
ans.append(i)
if IN[n]==1:
ans.append(n)
print(n,len(ans))
print(*ans)
for _ in range(int(input())):
solve()
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Stage 1: Program answer Dangerous Syscalls
input:
6 3 0 2 1 1 3 3 1 2 3 3 1 1 3 1 2 3 1 3
output:
3 1 3