Submission #1604303
Source Code Expand
#include <ctime> #include <cstdio> #include <cstdlib> #include <cstring> #include <cassert> #include <algorithm> #include <iostream> #include <vector> #include <queue> #include <stack> #include <deque> #include <set> #include <map> using namespace std; typedef long long ll; typedef double lf; typedef long double Lf; typedef pair <int,int> pii; typedef pair <ll, ll> pll; #define TRACE(x) cerr << #x << " " << x << endl #define FOR(i, a, b) for (int i = (a); i < int(b); i++) #define REP(i, n) FOR(i, 0, n) #define all(x) (x).begin(), (x).end() #define _ << " " << #define fi first #define sec second #define mp make_pair const int MAXN = 100100; int n, a, b, cnt[MAXN]; int main() { scanf("%d",&n); REP(i, n) { REP(j, 2) { cin >> a; cnt[a] ^= 1; } } REP(i, MAXN) { if (cnt[i]) { puts("NO"); return 0; } } puts("YES"); return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Unplanned Queries |
User | mkisic |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 949 Byte |
Status | WA |
Exec Time | 71 ms |
Memory | 640 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:37:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&n); ^
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 500 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt |
All | sample1.txt, sample2.txt, in1.txt, in10.txt, in11.txt, in12.txt, in13.txt, in14.txt, in15.txt, in16.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt, sample1.txt, sample2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | AC | 71 ms | 640 KB |
in10.txt | WA | 70 ms | 640 KB |
in11.txt | AC | 7 ms | 256 KB |
in12.txt | WA | 71 ms | 640 KB |
in13.txt | AC | 69 ms | 640 KB |
in14.txt | AC | 71 ms | 640 KB |
in15.txt | WA | 1 ms | 256 KB |
in16.txt | WA | 1 ms | 256 KB |
in2.txt | AC | 70 ms | 640 KB |
in3.txt | AC | 71 ms | 640 KB |
in4.txt | AC | 70 ms | 640 KB |
in5.txt | AC | 71 ms | 640 KB |
in6.txt | AC | 71 ms | 640 KB |
in7.txt | WA | 71 ms | 640 KB |
in8.txt | WA | 70 ms | 640 KB |
in9.txt | AC | 71 ms | 640 KB |
sample1.txt | AC | 1 ms | 256 KB |
sample2.txt | AC | 1 ms | 256 KB |