結果

問題 No.1563 Same Degree
ユーザー brthyyjp
提出日時 2021-07-13 18:31:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 87 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 325 ms
コンパイル使用メモリ 82,144 KB
実行使用メモリ 80,040 KB
最終ジャッジ日時 2024-07-02 14:22:26
合計ジャッジ時間 2,144 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import io, os
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline

t = int(input())
for _ in range(t):
    n, m = map(int, input().split())
    ind = [0]*n
    for i in range(m):
        a, b = map(int, input().split())
        a, b = a-1, b-1
        ind[a] += 1
        ind[b] += 1
    if len(set(ind)) == len(ind):
        print('No')
    else:
        print('Yes')
0