結果
問題 | No.1563 Same Degree |
ユーザー |
![]() |
提出日時 | 2023-06-18 19:38:32 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 242 ms / 2,000 ms |
コード長 | 353 bytes |
コンパイル時間 | 226 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 78,484 KB |
最終ジャッジ日時 | 2024-06-26 08:45:32 |
合計ジャッジ時間 | 4,830 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 15 |
ソースコード
from collections import CounterT = int(input())for t in range(T):N, M = map(int, input().split())deg = [0]*Nfor i in range(M):u, v = map(int, input().split())deg[u-1] += 1deg[v-1] += 1counted = Counter(deg)mx = max(counted.values())if mx > 1:print('Yes')else:print('No')