結果
| 問題 |
No.583 鉄道同好会
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-31 16:45:47 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 427 bytes |
| コンパイル時間 | 142 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 31,360 KB |
| 最終ジャッジ日時 | 2024-12-21 15:28:56 |
| 合計ジャッジ時間 | 3,984 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 16 |
ソースコード
def solve(N, M, data):
count = collections.Counter()
for d in data:
count.update(d)
oddcount = 0
for key, val in count.items():
if val % 2 == 1:
oddcount += 1
return "YES" if oddcount <= 2 else "NO"
if __name__ == '__main__':
N, M = map(int, input().split())
d = []
for _ in range(0, M):
d.append(list(map(int, input().split())))
print(solve(N, M, d))