結果
問題 |
No.1563 Same Degree
|
ユーザー |
![]() |
提出日時 | 2022-11-05 05:58:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 475 bytes |
コンパイル時間 | 204 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 64,116 KB |
最終ジャッジ日時 | 2024-07-19 02:19:20 |
合計ジャッジ時間 | 6,911 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 15 |
ソースコード
import collections def main(): t = int(input()) for _ in range(t): d = collections.defaultdict(set) n, m = map(int, input().split()) for _ in range(m): fr, to = map(int, input().split()) d[fr].add(to) d[to].add(fr) lst = list(map(len, dict(d).values())) if len(lst) != len(set(lst)): print("YES") else: print("NO") if __name__ == "__main__": main()