Submission #6373344


Source Code Expand

Copy
#include <bits/stdc++.h>
using namespace std;
#define PB push_back
#define ZERO (1e-10)
#define INF int(1e9+1)
#define CL(A,I) (memset(A,I,sizeof(A)))
#define DEB printf("DEB!\n");
#define D(X) cout<<"  "<<#X": "<<X<<endl;
#define EQ(A,B) (A+ZERO>B&&A-ZERO<B)
typedef long long ll;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
#define IN(n) int n;scanf("%d",&n);
#define FOR(i, m, n) for (int i(m); i < n; i++)
#define F(n) FOR(i,0,n)
#define FF(n) FOR(j,0,n)
#define FT(m, n) FOR(k, m, n)
#define aa first
#define bb second
void ga(int N,int *A){F(N)scanf("%d",A+i);}
map<int,int> T;
int N,a,A[1<<17];
int main(void){
    scanf("%d",&N);
    F(N)scanf("%d",&a),++T[a];
    --T[*A=a];
    FT(1,N){
        A[k]=A[k-1]^A[k-1];
        if(!T[A[k]])return puts("No"),0;
        --T[A[k]];
    }
    if((A[N-1]^*A)!=A[N-1])return puts("No"),0;
    puts("Yes");
    return 0;
}

Submission Info

Submission Time
Task A - XOR Circle
User Morass
Language C++14 (GCC 5.4.1)
Score 0
Code Size 964 Byte
Status WA
Exec Time 34 ms
Memory 3840 KB

Compile Error

./Main.cpp: In function ‘void ga(int, int*)’:
./Main.cpp:22:42: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
 void ga(int N,int *A){F(N)scanf("%d",A+i);}
                                          ^
./Main.cpp: In function ‘int main()’:
./Main.cpp:26:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&N);
                   ^
./Main.cpp:27:30: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     F(N)scanf("%d",&a),++T[a];
                              ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 1
WA × 1
AC × 16
WA × 6
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All sample_01.txt, sample_02.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt
Case Name Status Exec Time Memory
sample_01.txt WA 1 ms 256 KB
sample_02.txt AC 1 ms 256 KB
test_01.txt AC 9 ms 640 KB
test_02.txt AC 9 ms 640 KB
test_03.txt AC 9 ms 768 KB
test_04.txt AC 10 ms 256 KB
test_05.txt WA 13 ms 256 KB
test_06.txt WA 6 ms 256 KB
test_07.txt AC 6 ms 256 KB
test_08.txt AC 5 ms 256 KB
test_09.txt AC 7 ms 256 KB
test_10.txt AC 13 ms 256 KB
test_11.txt AC 7 ms 256 KB
test_12.txt AC 11 ms 256 KB
test_13.txt AC 10 ms 256 KB
test_14.txt AC 8 ms 256 KB
test_15.txt WA 12 ms 384 KB
test_16.txt WA 2 ms 256 KB
test_17.txt AC 2 ms 256 KB
test_18.txt WA 3 ms 256 KB
test_19.txt AC 5 ms 384 KB
test_20.txt AC 34 ms 3840 KB