結果

問題 No.1563 Same Degree
ユーザー SK96376164SK96376164
提出日時 2021-06-26 13:34:40
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 467 bytes
コンパイル時間 1,542 ms
コンパイル使用メモリ 163,700 KB
実行使用メモリ 5,316 KB
最終ジャッジ日時 2023-09-07 16:31:32
合計ジャッジ時間 5,466 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,544 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 13 ms
4,588 KB
testcase_12 AC 26 ms
4,540 KB
testcase_13 AC 71 ms
4,652 KB
testcase_14 AC 81 ms
4,784 KB
testcase_15 AC 54 ms
4,676 KB
権限があれば一括ダウンロードができます

ソースコード

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,n+1){
      if(b[a[j]]>=1){
        cout<<"Yes\n";
        goto End;
      }
      b[a[j]]++;
    }
    cout<<"No\n";
    End:;
    rep(j,100001)a[j]=0;
    rep(j,200001)b[j]=0;
  }
}
0