結果

問題 No.1563 Same Degree
ユーザー convexineqconvexineq
提出日時 2021-07-09 07:28:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 199 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 80,420 KB
最終ジャッジ日時 2023-09-14 06:21:30
合計ジャッジ時間 4,772 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,160 KB
testcase_01 AC 167 ms
77,664 KB
testcase_02 AC 163 ms
77,700 KB
testcase_03 AC 152 ms
77,648 KB
testcase_04 AC 156 ms
77,736 KB
testcase_05 AC 157 ms
77,348 KB
testcase_06 AC 193 ms
78,388 KB
testcase_07 AC 189 ms
79,316 KB
testcase_08 AC 191 ms
79,976 KB
testcase_09 AC 198 ms
79,612 KB
testcase_10 AC 199 ms
80,420 KB
testcase_11 AC 103 ms
78,704 KB
testcase_12 AC 116 ms
78,896 KB
testcase_13 AC 159 ms
78,812 KB
testcase_14 AC 173 ms
78,632 KB
testcase_15 AC 143 ms
78,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    n,m = map(int,input().split())
    d = [0]*n
    for _ in range(m):
        u,v = map(int,input().split())
        d[u-1] += 1
        d[v-1] += 1
    r = [0]*n
    for i in d:
        if r[i]:
            return "Yes"
        else:
            r[i] += 1
    return "No"

for _ in range(int(input())):
    print(solve())
0