結果

問題 No.1219 Mancala Combo
ユーザー hedwig100hedwig100
提出日時 2020-09-04 21:40:32
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 884 bytes
コンパイル時間 1,387 ms
コンパイル使用メモリ 169,764 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-04 21:52:52
合計ジャッジ時間 2,423 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (int)(n); i ++)
#define irep(i,n) for (int i = (int)(n) - 1;i >= 0;--i)
using namespace std;
using ll = long long;
using PL = pair<ll,ll>;
using P = pair<int,int>;
constexpr int INF = 1000000000;
constexpr long long HINF = 1000000000000000;
constexpr long long MOD = 1000000007;// = 998244353;
constexpr double EPS = 1e-4;
constexpr double PI = 3.14159265358979;

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    int N; cin >> N;
    vector<int> A(N + 1);
    rep(i,N) cin >> A[i + 1];
    vector<int> imos(N + 1,0);

    bool flag = true;
    irep(i,N + 1) {
        if (i == 0) break;
        A[i] += imos[i];
        if (A[i]%i != 0) {
            flag = false;
            break;
        }
        imos[i - 1] = imos[i] + A[i]/i;
    }
    cout << (flag ? "Yes" : "No") << '\n';
    return 0;
}
0