QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#117779 | #6569. Splitting Pairs | UNos_maricones | WA | 0ms | 3452kb | C++20 | 537b | 2023-07-02 08:26:16 | 2023-07-02 08:26:18 |
Judging History
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;
}
Details
Tip: Click on the bar to expand more detailed information
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'