結果

問題 No.1563 Same Degree
ユーザー titan23titan23
提出日時 2022-06-29 02:31:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 223 ms / 2,000 ms
コード長 398 bytes
コンパイル時間 352 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 87,296 KB
最終ジャッジ日時 2024-05-01 16:30:56
合計ジャッジ時間 4,065 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
52,352 KB
testcase_01 AC 114 ms
76,416 KB
testcase_02 AC 106 ms
76,160 KB
testcase_03 AC 108 ms
75,776 KB
testcase_04 AC 109 ms
76,032 KB
testcase_05 AC 108 ms
75,904 KB
testcase_06 AC 142 ms
76,672 KB
testcase_07 AC 119 ms
76,928 KB
testcase_08 AC 121 ms
76,800 KB
testcase_09 AC 120 ms
76,928 KB
testcase_10 AC 120 ms
77,312 KB
testcase_11 AC 99 ms
81,920 KB
testcase_12 AC 115 ms
81,920 KB
testcase_13 AC 207 ms
86,144 KB
testcase_14 AC 223 ms
87,296 KB
testcase_15 AC 181 ms
86,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda: sys.stdin.readline().rstrip()

#  -----------------------  #

def main():
  n, m = map(int, input().split())
  G = [[] for _ in range(n)]
  for _ in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    G[a].append(b)
    G[b].append(a)
  if n == 1:
    return 'No'
  else:
    return 'Yes'


print('\n'.join(str(main()) for _ in range(int(input()))))
0