結果

問題 No.1219 Mancala Combo
ユーザー kibou1136
提出日時 2021-12-24 09:35:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 400 bytes
コンパイル時間 1,401 ms
コンパイル使用メモリ 166,128 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-19 06:31:52
合計ジャッジ時間 2,843 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

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


int main(){
    int n; cin >> n;
    int a[n + 1];
    for (int i = 1; i <= n; ++i) cin >> a[i];
    int times = 0;
    for (int i = n; i >= 1; --i){
        if (a[i] <= i && (a[i] + times)%i==0){
            if (a[i] > 0) ++times;
        }else{
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    
}
0