結果
| 問題 |
No.583 鉄道同好会
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-27 22:50:24 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 315 bytes |
| コンパイル時間 | 1,508 ms |
| コンパイル使用メモリ | 166,036 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-21 22:41:54 |
| 合計ジャッジ時間 | 2,188 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 1 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
int cnt[500];
int main(){
int n,m;scanf("%d%d",&n,&m);
rep(i,m){
int a,b;scanf("%d%d",&a,&b);
cnt[a]++;cnt[b]++;
}
int c=0,d=0;
rep(i,n){
if(cnt[i]%2)c++;
else d++;
}
if(c==0||c==2)puts("YES");
else puts("NO");
}