QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#117779#6569. Splitting PairsUNos_mariconesWA 0ms3452kbC++20537b2023-07-02 08:26:162023-07-02 08:26:18

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-02 08:26:18]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3452kb
  • [2023-07-02 08:26:16]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

#ifdef LOCAL
#include "../debug.h"
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif




int main(){
	ios_base::sync_with_stdio(0); cin.tie(0);
	int T;
	cin>>T;
	while(T--){
		int n;
		cin>>n;
		int cnt = 0;
		for(int i=0; i<n; i++){
			int x;
			cin>>x;
			cnt += (x&1);
		}
		cnt = n - cnt;
		int ok = 0;
		if(cnt){
			if((n&1) && cnt == n) ok = 0;
		}
		cout<<ok<<'\n';
	}
	return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3452kb

input:

4
3
1 1 1
3
1 1 2
3
2 2 2
4
4 4 4 4

output:

0
0
0
0

result:

wrong answer 2nd lines differ - expected: '1', found: '0'