Submission #170490

# Submission time Handle Problem Language Result Execution time Memory
170490 2019-12-25T12:46:59 Z mcdx9524 Bootfall (IZhO17_bootfall) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N = 1000;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n;
    int ans = 0;
    int p[1e5] = {0};
    for (int i = 1; i <= N; i++) {
        for (int j = 1; j <= N; j++) {
            for (int k = 1; k <= N; k++) {
                if (i + j + k >= 3 || i + j - 1 >= 1) {
                    p[i + j + k]++;
                }
            }
        }
    }
    cout << ans << '\n';
    return 0;
}

Compilation message

bootfall.cpp: In function 'int main()':
bootfall.cpp:15:14: error: size of array 'p' has non-integral type 'double'
     int p[1e5] = {0};
              ^