結果
問題 |
No.583 鉄道同好会
|
ユーザー |
|
提出日時 | 2017-10-27 22:49:53 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 514 bytes |
コンパイル時間 | 490 ms |
コンパイル使用メモリ | 61,428 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-21 22:41:47 |
合計ジャッジ時間 | 1,353 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 WA * 1 |
ソースコード
#include <iostream> #include <algorithm> #include <cmath> using namespace std; int main(){ int N, M; cin >> N >> M; int stop[N]; for(int i = 0; i < N; i++){ stop[i] = 0; } for(int i = 0; i < M * 2; i++){ int stop_station; cin >> stop_station; stop[stop_station]++; } int count = 0; for(int i = 0; i < N; i++){ count += stop[i] % 2; } if(count <= 2){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }