結果
問題 | No.1586 Equal Array |
ユーザー |
|
提出日時 | 2021-07-08 22:25:28 |
言語 | C++14 (gcc 11.2.0 + boost 1.78.0) |
結果 |
AC
|
実行時間 | 40 ms / 1,000 ms |
コード長 | 1,842 bytes |
コンパイル時間 | 3,977 ms |
使用メモリ | 4,008 KB |
最終ジャッジ日時 | 2023-02-01 18:35:01 |
合計ジャッジ時間 | 5,053 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
3,464 KB |
testcase_01 | AC | 1 ms
3,452 KB |
testcase_02 | AC | 1 ms
3,420 KB |
testcase_03 | AC | 2 ms
3,400 KB |
testcase_04 | AC | 17 ms
3,856 KB |
testcase_05 | AC | 18 ms
3,928 KB |
testcase_06 | AC | 37 ms
3,908 KB |
testcase_07 | AC | 37 ms
3,868 KB |
testcase_08 | AC | 37 ms
4,008 KB |
testcase_09 | AC | 37 ms
3,908 KB |
testcase_10 | AC | 38 ms
3,948 KB |
testcase_11 | AC | 2 ms
3,404 KB |
testcase_12 | AC | 1 ms
3,396 KB |
testcase_13 | AC | 38 ms
3,948 KB |
testcase_14 | AC | 37 ms
3,880 KB |
testcase_15 | AC | 37 ms
3,944 KB |
testcase_16 | AC | 37 ms
3,872 KB |
testcase_17 | AC | 2 ms
3,484 KB |
testcase_18 | AC | 38 ms
3,860 KB |
testcase_19 | AC | 40 ms
3,872 KB |
testcase_20 | AC | 1 ms
3,464 KB |
testcase_21 | AC | 1 ms
3,464 KB |
testcase_22 | AC | 2 ms
3,504 KB |
ソースコード
/*#include <iostream> // cout, endl, cin #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <map> // map #include <queue> // queue, priority_queue #include <set> // set #include <stack> // stack #include <deque> // deque #include <unordered_map> // unordered_map #include <unordered_set> // unordered_set #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <iomanip>//fixed,setprecision #include <limits.n>//INT_MAX #include <math.n>//M_PI #include <random> #include <time.h>*/ #include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; using mint = modint1000000007; //using mint = modint998244353; //std::chrono::time_point<std::chrono::steady_clock> start; template <typename T> bool chmax(T &u, const T z) { if (u < z) {u = z; return true;} else return false; } template <typename T> bool chmin(T &u, const T z) { if (u > z) {u = z; return true;} else return false; } #define ll long long #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) typedef pair<ll, int> P; ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; } ll lcm(ll a, ll b){return a * b / gcd(a, b);} template<class T, class U> //contain(string s,string v) sにvが含まれるかを判定 bool contain(const std::basic_string<T>& s, const U& v) { return s.find(v) != std::basic_string<T>::npos; } std::chrono::time_point<std::chrono::steady_clock> start; int main(){ ll n; cin>>n; vector<ll>a(n); ll sum=0; rep(i,n){ cin>>a[i]; sum+=a[i]; } if(sum%n==0)cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }