結果
| 問題 |
No.1563 Same Degree
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2024-11-30 00:20:16 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 541 ms / 2,000 ms |
| コード長 | 371 bytes |
| コンパイル時間 | 151 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 11,392 KB |
| 最終ジャッジ日時 | 2024-11-30 00:20:24 |
| 合計ジャッジ時間 | 6,108 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 15 |
ソースコード
from collections import Counter
T=int(input())
for tests in range(T):
N,M=map(int,input().split())
D=[0]*N
for i in range(M):
x,y=map(int,input().split())
D[x-1]+=1
D[y-1]+=1
C=Counter(D)
flag=0
for c in C:
if C[c]>=2:
flag=1
if flag==1:
print("Yes")
else:
print("No")
titia