結果

問題 No.1563 Same Degree
ユーザー ygd.ygd.
提出日時 2021-06-28 19:52:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 496 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 91,468 KB
最終ジャッジ日時 2023-09-07 20:52:12
合計ジャッジ時間 4,229 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,320 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 114 ms
82,132 KB
testcase_12 AC 133 ms
84,812 KB
testcase_13 AC 225 ms
90,236 KB
testcase_14 AC 238 ms
91,468 KB
testcase_15 AC 195 ms
89,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    T = int(input())
    for _ in range(T):
        N,M = map(int,input().split())
        G = [[] for _ in range(N)]
        for i in range(M):
            u,v = map(int,input().split())
            u-=1;v=-1
            G[u].append(v)
            G[v].append(u)
        s = set([])
        for i in range(N):
            t = len(G[i])
            s.add(t)
        if len(s) == N:
            print("No")
        else:
            print("Yes")


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