結果

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

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    int N;
    cin>>N;
    vector<int> A(N);
    for(int &i:A)cin>>i;
    int sum=0;
    for(int i=N-1;i>=0;i--){
        if((sum+A[i])%(i+1)){
            puts("No");
            return 0;
        }
        sum+=(sum+A[i])/(i+1);
    }
    puts("Yes");
}
0