結果
問題 |
No.1563 Same Degree
|
ユーザー |
|
提出日時 | 2023-06-25 13:03:33 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 161 ms / 2,000 ms |
コード長 | 334 bytes |
コンパイル時間 | 171 ms |
コンパイル使用メモリ | 82,316 KB |
実行使用メモリ | 77,764 KB |
最終ジャッジ日時 | 2024-07-02 13:02:40 |
合計ジャッジ時間 | 3,452 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 15 |
ソースコード
for _ in range(int(input())): N, M = map(int, input().split()) cnts = [0] * N for i in range(M): U, V = map(int, input().split()) cnts[U - 1] += 1 cnts[V - 1] += 1 isO = False isS = [False] * N for c in cnts: isO |= isS[c] isS[c] = True print("Yes" if isO else "No")