結果

問題 No.1563 Same Degree
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-06-26 13:03:09
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 300 ms / 2,000 ms
コード長 307 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 87,244 KB
実行使用メモリ 89,876 KB
最終ジャッジ日時 2023-09-07 16:14:36
合計ジャッジ時間 4,743 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,432 KB
testcase_01 AC 198 ms
77,980 KB
testcase_02 AC 174 ms
78,224 KB
testcase_03 AC 177 ms
78,448 KB
testcase_04 AC 180 ms
77,724 KB
testcase_05 AC 188 ms
80,332 KB
testcase_06 AC 261 ms
79,968 KB
testcase_07 AC 255 ms
79,328 KB
testcase_08 AC 264 ms
78,788 KB
testcase_09 AC 257 ms
79,812 KB
testcase_10 AC 261 ms
80,220 KB
testcase_11 AC 134 ms
82,720 KB
testcase_12 AC 163 ms
85,920 KB
testcase_13 AC 277 ms
89,876 KB
testcase_14 AC 300 ms
89,452 KB
testcase_15 AC 235 ms
88,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
    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)
    s = set([len(G[i]) for i in range(n)])
    print("Yes" if n - len(s) else "No")
0