結果
| 問題 | No.1563 Same Degree |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-25 13:03:33 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 134 ms / 2,000 ms |
| コード長 | 334 bytes |
| 記録 | |
| コンパイル時間 | 613 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 82,688 KB |
| 最終ジャッジ日時 | 2026-03-23 21:20:49 |
| 合計ジャッジ時間 | 3,581 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")