結果
問題 |
No.1563 Same Degree
|
ユーザー |
![]() |
提出日時 | 2023-11-08 16:55:41 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 260 ms / 2,000 ms |
コード長 | 399 bytes |
コンパイル時間 | 254 ms |
コンパイル使用メモリ | 82,816 KB |
実行使用メモリ | 87,296 KB |
最終ジャッジ日時 | 2024-09-25 23:41:38 |
合計ジャッジ時間 | 4,740 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 15 |
ソースコード
T = int(input()) for _ in range(T): N,M = map(int,input().split()) G = [[] for i in range(N)] for _ in range(M): u,v = map(int,input().split()) G[u - 1].append(v - 1) G[v - 1].append(u - 1) cnt = set() for i in range(N): c = len(G[i]) if c in cnt: print("Yes") break cnt.add(c) else: print("No")