結果

問題 No.1219 Mancala Combo
ユーザー ytftytft
提出日時 2021-05-14 00:00:48
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 387 bytes
コンパイル時間 11,458 ms
コンパイル使用メモリ 366,924 KB
実行使用メモリ 9,560 KB
最終ジャッジ日時 2023-10-26 03:58:54
合計ジャッジ時間 8,058 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 WA -
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,348 KB
testcase_07 WA -
testcase_08 AC 2 ms
4,348 KB
testcase_09 WA -
testcase_10 AC 2 ms
4,348 KB
testcase_11 WA -
testcase_12 AC 2 ms
4,348 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 WA -
testcase_18 AC 13 ms
7,712 KB
testcase_19 WA -
testcase_20 AC 13 ms
7,976 KB
testcase_21 WA -
testcase_22 AC 11 ms
7,184 KB
testcase_23 WA -
testcase_24 AC 11 ms
6,724 KB
testcase_25 WA -
testcase_26 AC 13 ms
7,712 KB
testcase_27 WA -
testcase_28 AC 18 ms
9,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <boost/multiprecision/cpp_int.hpp>
typedef boost::multiprecision::cpp_int mp;

int main(){
    int n;
    cin>>n;
    vector<mp> A(n);
    mp cnt=0;
    for(int i=n-1;i!=-1;--i){
        if((A[i]+cnt)%(i+1)){
            cout<<"No"<<endl;
            return 0;
        }
        cnt+=(A[i]+cnt)/(i+1);
    }
    cout<<"Yes"<<endl;
}
0