Submission #1263484
Source Code Expand
#include <iostream> #include <cstdio> #include <vector> #include <string> #include <algorithm> #include <set> #include <map> #define rep(i,n) for(int i=0; i<(n); i++) #define reps(i,x,n) for(int i=x; i<(n); i++) #define rrep(i,n) for(int i=(n)-1; i>=0; i--) #define all(X) (X).begin(),(X).end() #define X first #define Y second #define pb push_back #define eb emplace_back using namespace std; typedef long long int ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; } template<class A, size_t N, class T> void Fill(A (&a)[N], const T &v){ fill( (T*)a, (T*)(a+N), v ); } const ll INF = 0x3fffffff; int main(){ //ios_base::sync_with_stdio(0); int N, M; int cnt[100005] = {}; cin >> N >> M; rep(i,M){ int a, b; cin >> a >> b; cnt[a]++; cnt[b]++; } bool ans = true; rep(i,N+1) if( cnt[i] % 2 ) ans = false; cout << (ans ? "YES" : "NO") << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Unplanned Queries |
User | oyas |
Language | C++14 (GCC 5.4.1) |
Score | 500 |
Code Size | 1114 Byte |
Status | AC |
Exec Time | 73 ms |
Memory | 640 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 500 / 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 | 70 ms | 640 KB |
in10.txt | AC | 71 ms | 640 KB |
in11.txt | AC | 60 ms | 640 KB |
in12.txt | AC | 71 ms | 640 KB |
in13.txt | AC | 69 ms | 640 KB |
in14.txt | AC | 73 ms | 640 KB |
in15.txt | AC | 1 ms | 640 KB |
in16.txt | AC | 1 ms | 640 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 | 70 ms | 640 KB |
in7.txt | AC | 71 ms | 640 KB |
in8.txt | AC | 69 ms | 640 KB |
in9.txt | AC | 71 ms | 640 KB |
sample1.txt | AC | 1 ms | 640 KB |
sample2.txt | AC | 1 ms | 640 KB |