結果

問題 No.1563 Same Degree
ユーザー googol_S0googol_S0
提出日時 2021-06-26 13:37:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 213 ms / 2,000 ms
コード長 238 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 87,224 KB
実行使用メモリ 80,060 KB
最終ジャッジ日時 2023-09-07 16:32:21
合計ジャッジ時間 3,955 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,364 KB
testcase_01 AC 164 ms
77,748 KB
testcase_02 AC 161 ms
77,704 KB
testcase_03 AC 164 ms
77,680 KB
testcase_04 AC 164 ms
77,900 KB
testcase_05 AC 168 ms
78,136 KB
testcase_06 AC 208 ms
79,528 KB
testcase_07 AC 208 ms
80,012 KB
testcase_08 AC 208 ms
80,060 KB
testcase_09 AC 213 ms
79,996 KB
testcase_10 AC 211 ms
79,168 KB
testcase_11 AC 106 ms
78,132 KB
testcase_12 AC 119 ms
78,184 KB
testcase_13 AC 167 ms
78,012 KB
testcase_14 AC 176 ms
78,084 KB
testcase_15 AC 151 ms
78,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
  N,M=map(int,input().split())
  C=[0]*N
  for i in range(M):
    a,b=map(int,input().split())
    C[a-1]+=1
    C[b-1]+=1
  if len(set(C))==N:
    print('No')
  else:
    print('Yes')

for t in range(int(input())):
  solve()
0