結果

問題 No.1563 Same Degree
ユーザー nasubi24
提出日時 2021-06-26 13:22:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 205 ms / 2,000 ms
コード長 315 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 82,428 KB
実行使用メモリ 78,556 KB
最終ジャッジ日時 2024-06-25 10:22:58
合計ジャッジ時間 3,408 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

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