結果
| 問題 | No.583 鉄道同好会 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-09-02 16:51:37 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 440 bytes | 
| コンパイル時間 | 669 ms | 
| コンパイル使用メモリ | 64,124 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-01 20:35:36 | 
| 合計ジャッジ時間 | 2,181 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 15 WA * 1 | 
ソースコード
// domino?
#include<iostream>
using namespace std;
int main(){
    int n, m;
    cin >> n >> m;
    int s[501] = {};
    int a, b;
    for(int i = 0; i < m; i++){
        cin >> a >> b;
        s[a]++;
        s[b]++;
    }
    int odd = 0;
    for(int i = 0; i < n; i++){
        odd += (s[i] % 2);
    }
    if(odd == 0 || odd == 2)    cout << "YES" << endl;
    else                        cout << "NO" << endl;
    
    return 0;
}
            
            
            
        