結果

問題 No.1563 Same Degree
ユーザー SK96376164
提出日時 2021-06-26 13:19:23
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 420 bytes
コンパイル時間 1,537 ms
コンパイル使用メモリ 165,084 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-25 10:20:43
合計ジャッジ時間 2,949 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 5 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
int a[100001];
int b[200001];
int main(){
  int t;cin>>t;
  rep(i,t){
    int n,m;cin>>n>>m;
    rep(j,m){
      int u,v;cin>>u>>v;
      a[u]++;
      a[v]++;
    }
    rep(j,100001){
      if(b[a[j]]>=1){
        cout<<"Yes\n";
        goto End;
      }
      b[a[j]]++;
    }
    cout<<"No\n";
    End:;
  }
}
0