結果

問題 No.1219 Mancala Combo
ユーザー 0w1
提出日時 2020-11-15 16:39:57
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 2,449 ms
コンパイル使用メモリ 194,776 KB
最終ジャッジ日時 2025-01-16 00:58:33
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  ios::sync_with_stdio(false);

  int N; { cin >> N; }

  vector<int> A(N); {
    for (int i = 0; i < N; ++i) cin >> A[i];
  }

  int64_t s = 0;
  for (int i = N - 1; ~i; --i) {
    s += A[i];
    if (s % (i + 1)) {
      cout << "No" << endl;
      return 0;
    }
  }

  cout << "Yes" << endl;
}
0