結果

問題 No.1563 Same Degree
ユーザー 👑 H20H20
提出日時 2021-06-27 16:04:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 319 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 684 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 83,420 KB
最終ジャッジ日時 2023-09-07 18:01:07
合計ジャッジ時間 5,585 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
71,712 KB
testcase_01 AC 213 ms
78,456 KB
testcase_02 AC 198 ms
78,448 KB
testcase_03 AC 203 ms
78,464 KB
testcase_04 AC 200 ms
78,424 KB
testcase_05 AC 258 ms
79,772 KB
testcase_06 AC 299 ms
79,780 KB
testcase_07 AC 303 ms
80,848 KB
testcase_08 AC 292 ms
80,584 KB
testcase_09 AC 319 ms
83,420 KB
testcase_10 AC 290 ms
79,700 KB
testcase_11 AC 135 ms
78,752 KB
testcase_12 AC 149 ms
78,748 KB
testcase_13 AC 197 ms
78,756 KB
testcase_14 AC 208 ms
78,720 KB
testcase_15 AC 179 ms
78,748 KB
権限があれば一括ダウンロードができます

ソースコード

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