結果
問題 |
No.583 鉄道同好会
|
ユーザー |
|
提出日時 | 2017-10-27 23:00:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 514 bytes |
コンパイル時間 | 591 ms |
コンパイル使用メモリ | 70,656 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 22:37:45 |
合計ジャッジ時間 | 1,482 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; } }