結果
問題 | No.1563 Same Degree |
ユーザー | hiragn |
提出日時 | 2022-11-05 06:05:27 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 533 bytes |
コンパイル時間 | 312 ms |
コンパイル使用メモリ | 10,756 KB |
実行使用メモリ | 61,808 KB |
最終ジャッジ日時 | 2023-09-26 07:05:33 |
合計ジャッジ時間 | 6,049 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 19 ms
8,548 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 104 ms
20,072 KB |
testcase_12 | AC | 212 ms
30,500 KB |
testcase_13 | AC | 619 ms
56,224 KB |
testcase_14 | AC | 695 ms
61,808 KB |
testcase_15 | AC | 425 ms
43,024 KB |
ソースコード
import collections def main(): t = int(input()) for _ in range(t): n, m = map(int, input().split()) if n == 1: print("YES") continue d = collections.defaultdict(set) 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(set(lst)) != n: print("Yes") else: print("No") if __name__ == "__main__": main()