Submission #1262802
Source Code Expand
#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <cstring>
#include <queue>
#include <ctime>
#include <cassert>
#include <cstdio>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <random>
#include <functional>
using namespace std;
#define F first
#define S second
#define pb push_back
#define epr(...) fprintf(stderr, __VA_ARGS__)
#define db(x) cerr << #x << " = " << x << endl
#define db2(x, y) cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n";
#define db3(x, y, z) cerr << "(" << #x << ", " << #y << ", " << #z << ") = (" << x << ", " << y << ", " << z << ")\n"
#define dbv(a) cerr << #a << ": "; for (auto& xxxx: a) cerr << xxxx << " "; cerr << endl;
#define all(a) (a).begin(), (a).end()
#define sz(a) (int)a.size()
#define pw(n) (1ll << (n))
#define equal equalll
#define less lesss
typedef long double dbl;
typedef long long ll;
const int N = -1;
const ll INF = 1.01e9;
typedef vector<int> vi;
int main(){
#ifdef HOME
assert(freopen("in", "r", stdin));
#endif
int n, m;
scanf("%d%d", &n, &m);
vector<int> a(n);
for (int i = 0; i < n; i++) {
int v, u;
scanf("%d%d", &v, &u); v--; u--;
a[v] ^= 1;
a[u] ^= 1;
}
bool ok = 1;
for (auto A: a) {
ok &= A == 0;
}
if (ok)
puts("YES");
else
puts("NO");
#ifdef HOME
epr("time = %d ms\n", (int)(clock() * 1000. / CLOCKS_PER_SEC));
#endif
return 0;
}
Submission Info
Submission Time |
|
Task |
B - Unplanned Queries |
User |
Belonogov |
Language |
C++14 (GCC 5.4.1) |
Score |
0 |
Code Size |
1630 Byte |
Status |
WA |
Exec Time |
18 ms |
Memory |
640 KB |
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:48:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &m);
^
./Main.cpp:52:30: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &v, &u); v--; u--;
^
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 |
18 ms |
640 KB |
in10.txt |
AC |
18 ms |
640 KB |
in11.txt |
AC |
3 ms |
256 KB |
in12.txt |
WA |
17 ms |
640 KB |
in13.txt |
WA |
18 ms |
640 KB |
in14.txt |
AC |
18 ms |
640 KB |
in15.txt |
AC |
1 ms |
256 KB |
in16.txt |
WA |
1 ms |
256 KB |
in2.txt |
AC |
18 ms |
640 KB |
in3.txt |
AC |
18 ms |
640 KB |
in4.txt |
AC |
18 ms |
640 KB |
in5.txt |
AC |
18 ms |
640 KB |
in6.txt |
AC |
17 ms |
640 KB |
in7.txt |
AC |
18 ms |
640 KB |
in8.txt |
AC |
17 ms |
640 KB |
in9.txt |
AC |
18 ms |
640 KB |
sample1.txt |
AC |
1 ms |
256 KB |
sample2.txt |
AC |
1 ms |
256 KB |