Submission #6385877


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<ll,ll> T;
ll L,N,a,A[1<<17],B[1<<17];
int main(void){
    scanf("%lld",&N);
    F(N)scanf("%lld",&a),++T[a];
    for(auto&h:T)A[L]=h.aa,B[L++]=h.bb;
    if(L==1&&!*A)return puts("Yes"),0;
    if(L^3)return puts("No"),0;
    if((A[0]^A[1])!=A[2]||(A[0]^A[2])!=A[1]||(A[1]^A[2])!=A[0])return puts("No"),0;
    puts(B[1]==*B&&B[1]==B[2]?"Yes":"No");
    return 0;
}

Submission Info

Submission Time
Task A - XOR Circle
User Morass
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1024 Byte
Status WA
Exec Time 40 ms
Memory 6272 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:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%lld",&N);
                     ^
./Main.cpp:27:32: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     F(N)scanf("%lld",&a),++T[a];
                                ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
AC × 19
WA × 3
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 AC 1 ms 256 KB
sample_02.txt AC 1 ms 256 KB
test_01.txt AC 8 ms 256 KB
test_02.txt AC 8 ms 256 KB
test_03.txt AC 8 ms 256 KB
test_04.txt AC 10 ms 256 KB
test_05.txt AC 13 ms 256 KB
test_06.txt AC 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 11 ms 256 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 256 KB
test_20.txt AC 40 ms 6272 KB