結果

問題 No.1563 Same Degree
ユーザー H20
提出日時 2021-06-27 16:04:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 232 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 603 ms
コンパイル使用メモリ 82,920 KB
実行使用メモリ 78,936 KB
最終ジャッジ日時 2024-06-25 11:48:52
合計ジャッジ時間 4,017 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
T = int(input())
for _ in range(T):
    N,M = map(int, input().split())
    L = [0]*N
    for _ in range(M):
        a,b = map(int, input().split())
        L[a-1]+=1
        L[b-1]+=1
    C = collections.Counter(L)
    for v in C.values():
        if v>=2:
            print('Yes')
            break
    else:
        print('No')
0