結果

問題 No.1219 Mancala Combo
ユーザー 🍮かんプリン
提出日時 2020-09-05 02:41:28
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 550 bytes
コンパイル時間 1,505 ms
コンパイル使用メモリ 167,376 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-27 03:03:29
合計ジャッジ時間 3,401 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

/**
 *   @FileName	a.cpp
 *   @Author	kanpurin
 *   @Created	2020.09.05 02:41:24
**/

#include "bits/stdc++.h" 
using namespace std; 
typedef long long ll;

int main() {
    int n;cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    int now_cnt = 0;
    for (int i = n - 1; i >= 0; i--) {
        if ((a[i] + now_cnt) % (i + 1) == 0) {
            now_cnt += (a[i] + now_cnt) / (i + 1);
        }
        else {
            puts("No");
            return 0;
        }
    }
    puts("Yes");
    return 0;
}
0