結果

問題 No.1563 Same Degree
ユーザー lllllll88938494
提出日時 2022-01-11 17:56:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 315 ms / 2,000 ms
コード長 370 bytes
コンパイル時間 526 ms
コンパイル使用メモリ 82,312 KB
実行使用メモリ 87,632 KB
最終ジャッジ日時 2024-11-14 11:42:11
合計ジャッジ時間 5,525 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

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