QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#301942#4825. Even and Odd CombinationsLoging#0 0ms0kbC++20391b2024-01-10 14:42:242024-01-10 14:42:24

Judging History

你现在查看的是最新测评结果

  • [2024-01-10 14:42:24]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [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)