結果

問題 No.1563 Same Degree
ユーザー kikagekikage
提出日時 2021-08-11 02:25:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 490 ms / 2,000 ms
コード長 257 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 11,820 KB
実行使用メモリ 10,692 KB
最終ジャッジ日時 2023-10-24 16:57:39
合計ジャッジ時間 6,175 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,032 KB
testcase_01 AC 275 ms
10,044 KB
testcase_02 AC 274 ms
10,044 KB
testcase_03 AC 266 ms
10,044 KB
testcase_04 AC 279 ms
10,044 KB
testcase_05 AC 280 ms
10,044 KB
testcase_06 AC 253 ms
10,044 KB
testcase_07 AC 251 ms
10,044 KB
testcase_08 AC 252 ms
10,044 KB
testcase_09 AC 254 ms
10,044 KB
testcase_10 AC 246 ms
10,044 KB
testcase_11 AC 92 ms
10,692 KB
testcase_12 AC 167 ms
10,692 KB
testcase_13 AC 424 ms
10,692 KB
testcase_14 AC 490 ms
10,692 KB
testcase_15 AC 330 ms
10,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for case in range(T):
    N,M = map(int,input().split())
    Tree = [0]*N
    for i in range(M):
        u,v = map(int,input().split())
        Tree[u-1]+=1
        Tree[v-1]+=1
    if len(set(Tree))<N:print("Yes")
    else:print("No")
    
0