結果

問題 No.1219 Mancala Combo
ユーザー naribownaribow
提出日時 2020-09-05 00:26:58
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 852 bytes
コンパイル時間 1,629 ms
コンパイル使用メモリ 167,424 KB
実行使用メモリ 50,656 KB
最終ジャッジ日時 2023-08-17 20:59:18
合計ジャッジ時間 3,728 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
49,832 KB
testcase_01 AC 19 ms
49,820 KB
testcase_02 AC 19 ms
49,828 KB
testcase_03 AC 20 ms
49,692 KB
testcase_04 AC 19 ms
49,640 KB
testcase_05 AC 20 ms
49,920 KB
testcase_06 AC 20 ms
49,688 KB
testcase_07 AC 20 ms
49,824 KB
testcase_08 AC 20 ms
49,820 KB
testcase_09 AC 19 ms
49,644 KB
testcase_10 AC 19 ms
49,752 KB
testcase_11 AC 19 ms
49,860 KB
testcase_12 AC 20 ms
49,744 KB
testcase_13 AC 20 ms
49,920 KB
testcase_14 AC 20 ms
49,752 KB
testcase_15 AC 20 ms
49,664 KB
testcase_16 AC 19 ms
49,624 KB
testcase_17 AC 53 ms
50,476 KB
testcase_18 AC 58 ms
50,460 KB
testcase_19 AC 49 ms
50,396 KB
testcase_20 AC 60 ms
50,488 KB
testcase_21 AC 44 ms
50,484 KB
testcase_22 AC 54 ms
50,320 KB
testcase_23 AC 59 ms
50,588 KB
testcase_24 AC 49 ms
50,344 KB
testcase_25 AC 47 ms
50,484 KB
testcase_26 AC 59 ms
50,380 KB
testcase_27 AC 66 ms
50,656 KB
testcase_28 AC 75 ms
50,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double pi=3.141592653589793;
typedef unsigned long long ull;
typedef long double ldouble;
const ll INF=1e18;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

vector<vector<int> > c(2*10e5+1);

void solve(int x, int y) {

}

int main(){
  ll n, sum = 0;
  cin >> n;
  vector<int> a(n+1);
  
  rep(i, n){
    cin >> a[i+1];
  }
  
  for(int i = n; i > 0; i--){
    if((a[i] + sum) % (i) == 0) {
      sum += (a[i] + sum) / i;
    }
    else {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
0