結果

問題 No.1563 Same Degree
ユーザー lllllll88938494lllllll88938494
提出日時 2022-01-11 17:56:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 257 ms / 2,000 ms
コード長 370 bytes
コンパイル時間 385 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 87,660 KB
最終ジャッジ日時 2024-04-26 20:43:13
合計ジャッジ時間 4,761 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,968 KB
testcase_01 AC 164 ms
76,664 KB
testcase_02 AC 170 ms
76,732 KB
testcase_03 AC 180 ms
77,016 KB
testcase_04 AC 172 ms
77,172 KB
testcase_05 AC 182 ms
76,848 KB
testcase_06 AC 257 ms
78,484 KB
testcase_07 AC 223 ms
77,056 KB
testcase_08 AC 233 ms
77,568 KB
testcase_09 AC 233 ms
78,400 KB
testcase_10 AC 243 ms
78,444 KB
testcase_11 AC 94 ms
80,388 KB
testcase_12 AC 127 ms
83,712 KB
testcase_13 AC 218 ms
87,660 KB
testcase_14 AC 248 ms
87,316 KB
testcase_15 AC 171 ms
86,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t=int(input())

for i in range(t):
    n,m=map(int,input().split())
    ns=[[] for i in range(n+1)]
    s=set()
    for i in range(m):
        a,b=map(int,input().split())
        ns[a].append(b)
        ns[b].append(a)
    for i in range(1,n+1):
        s.add(len(ns[i]))
        if len(s) != i:
            print('Yes')
            break
    else:
        print('No')
0