結果
問題 | No.1563 Same Degree |
ユーザー |
![]() |
提出日時 | 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 CounterT=int(input())for tests in range(T):N,M=map(int,input().split())D=[0]*Nfor i in range(M):x,y=map(int,input().split())D[x-1]+=1D[y-1]+=1C=Counter(D)flag=0for c in C:if C[c]>=2:flag=1if flag==1:print("Yes")else:print("No")