QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#301942 | #4825. Even and Odd Combinations | Loging# | 0 | 0ms | 0kb | C++20 | 391b | 2024-01-10 14:42:24 | 2024-01-10 14:42:24 |
answer
#include<cstdio>
#define M 55
bool mark[M];
int main(){
int T;
scanf("%d",&T);
while(T--){
int n,K;
scanf("%d%d",&n,&K);
for(int i=1;i<=n;i++)mark[i]=false;
for(int i=1;i<=K;i++){
int x;
scanf("%d",&x);
mark[x]=true;
}
printf("%d %d\n",n,n-K);
for(int i=1;i<=n;i++){
if(mark[i])continue;
printf("%d ",i);
}
puts("");
}
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer on the first run
input:
6 3 0 2 1 1 3 3 1 2 3 3 1 1 3 1 2 3 1 3
output:
3 3 1 2 3 2 1 2 3 0 3 2 2 3 3 2 1 3 3 2 1 2
input:
output:
result:
wrong answer the size of your subset must have a different parity (test case 2)