結果

問題 No.2451 Redistribute Integers
ユーザー stella1225stella1225
提出日時 2023-09-01 21:51:34
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 981 bytes
コンパイル時間 2,568 ms
コンパイル使用メモリ 169,804 KB
実行使用メモリ 7,224 KB
最終ジャッジ日時 2023-09-01 21:51:43
合計ジャッジ時間 4,681 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 216 ms
6,916 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 147 ms
6,868 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 WA -
testcase_13 AC 185 ms
6,900 KB
testcase_14 AC 203 ms
6,960 KB
testcase_15 AC 104 ms
4,828 KB
testcase_16 AC 89 ms
4,876 KB
testcase_17 WA -
testcase_18 AC 187 ms
6,868 KB
testcase_19 WA -
testcase_20 AC 153 ms
5,928 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;
#define rep(i,a,n) for (int i = a; i < (n); i++)
#define all(x) (x).begin(),(x).end()
using ll = long long;
using P = pair<int,int>;
using Graph = vector<vector<int>>;
int mod = 998244353;
int INF = 1001001001;
using pll = pair<int,int>;

int Flag=0;

//デフォルトでNoがでる
void yn(int Flag){
  if(Flag==1){
    cout<<"Yes"<<endl;
  }
  else if(Flag==0){
    cout<<"No"<<endl;
  }
  else{
    cout<<"Draw"<<endl;
  }
}

void cerrGrid(vector<vector<char>> &C){
  int n=C.size();
  rep(i,0,n){
    for(auto x:C[i]){
      cerr<<x<<" ";
    }
    cerr<<endl;
  }
  cerr<<endl;
}

void cerrGraph(vector<vector<int>> &G){
  int n=G.size();
  rep(i,0,n){
    for(auto &x : G[i]){
      cerr<<x<<" ";
    }
    cerr<<endl;
  }
}



int main(){
  int N; cin>>N;
  vector<ll> A(N);
  ll sum=0;
  rep(i,0,N){
    cin>>A[i];
    sum+=A[i];
  }
  if(sum%N!=0) Flag=1;
  yn(!Flag);

}

0