結果
| 問題 |
No.583 鉄道同好会
|
| コンテスト | |
| ユーザー |
Kutimoti_T
|
| 提出日時 | 2018-06-24 16:09:42 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 443 bytes |
| コンパイル時間 | 1,291 ms |
| コンパイル使用メモリ | 160,996 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 22:31:06 |
| 合計ジャッジ時間 | 2,874 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)
int main(){
int N;
cin >> N;
int M;
cin >> M;
vector<int> cnt(N,0);
rep(i,0,M - 1){
int a,b;
cin >> a >> b;
cnt[a]++;
cnt[b]++;
}
int ans = 0;
rep(i,0,N - 1){
ans += cnt[i] % 2;
}
if(ans == 0 || ans == 2){
cout << "YES" << endl;
}
else{
cout << "NO" << endl; }
}
Kutimoti_T