結果

問題 No.1563 Same Degree
ユーザー kept1994kept1994
提出日時 2022-04-29 04:15:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 556 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 87,084 KB
実行使用メモリ 262,980 KB
最終ジャッジ日時 2023-09-10 20:48:36
合計ジャッジ時間 17,164 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
74,672 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 TLE -
testcase_07 TLE -
testcase_08 TLE -
testcase_09 TLE -
testcase_10 TLE -
testcase_11 AC 141 ms
82,988 KB
testcase_12 AC 163 ms
86,688 KB
testcase_13 AC 255 ms
89,880 KB
testcase_14 AC 275 ms
88,520 KB
testcase_15 AC 223 ms
87,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
from collections import defaultdict
import sys

MOD = 998244353

def main():
    T = int(input())

    for i in range(T):
        N, M = map(int, input().split())
        d = defaultdict(int)
        c = [0] * (2 * 10 ** 5 + 1)
        for _ in range(M):
            u, v = map(int, input().split())
            d[u] += 1
            d[v] += 1
        for k, dd in d.items():
            c[dd] += 1
            if c[dd] == 2:
                print("Yes")
                break
    return

    

if __name__ == '__main__':
    main()
0