結果

問題 No.1563 Same Degree
ユーザー nasubi24nasubi24
提出日時 2021-06-26 13:22:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 217 ms / 2,000 ms
コード長 315 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 80,008 KB
最終ジャッジ日時 2023-09-07 16:28:19
合計ジャッジ時間 3,866 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,352 KB
testcase_01 AC 155 ms
77,908 KB
testcase_02 AC 157 ms
78,000 KB
testcase_03 AC 158 ms
77,896 KB
testcase_04 AC 156 ms
77,916 KB
testcase_05 AC 155 ms
77,844 KB
testcase_06 AC 199 ms
78,604 KB
testcase_07 AC 209 ms
78,944 KB
testcase_08 AC 217 ms
79,140 KB
testcase_09 AC 201 ms
79,396 KB
testcase_10 AC 209 ms
80,008 KB
testcase_11 AC 107 ms
78,600 KB
testcase_12 AC 121 ms
78,572 KB
testcase_13 AC 166 ms
79,360 KB
testcase_14 AC 178 ms
79,528 KB
testcase_15 AC 152 ms
79,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

for t in range(int(input())):
    n,m=map(int,input().split())
    cnt=[0]*n
    for i in range(m):
        a,b=map(int,input().split())
        cnt[a-1]+=1
        cnt[b-1]+=1
    cnt2=[0]*(m+1)
    for i in range(n):
        cnt2[cnt[i]]+=1
    if max(cnt2)>=2:
        print("Yes")
    else:
        print("No")
0