This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
using namespace std;
int a[1001][1001];
int main()
{
int i,j;
int num;
int b[1001];
scanf("%d",&num);
for(i=0;i<num;i++) {
scanf("%d",&b[i]);
}
int max=0;
for(i=0;i<num;i++) {
for(j=0;;j++) {
if(b[i]%2==0) a[i][j]=0;
else a[i][j]=1;
if(b[i]==1) {
if(j>max) max=j;
break;
}
b[i]=b[i]/2;
}
}
int ak[1001]={0,};
for(i=0;i<num;i++) {
for(j=0;j<num;j++) {
if(a[j][i]==1) ak[i]++;
}
}
int ck=1;
for(i=0;i<num;i++) {
if(ak[i]%2==1) {
ck=0;
break;
}
}
if(ck==1) printf("0");
else printf("0");
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |