結果

問題 No.1563 Same Degree
コンテスト
ユーザー brthyyjp
提出日時 2021-07-13 18:31:15
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 70 ms / 2,000 ms
コード長 388 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 121 ms
コンパイル使用メモリ 85,504 KB
実行使用メモリ 84,608 KB
最終ジャッジ日時 2026-03-23 22:13:50
合計ジャッジ時間 1,788 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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