제출 #170489

#제출 시각아이디문제언어결과실행 시간메모리
170489mcdx9524Bootfall (IZhO17_bootfall)C++14
컴파일 에러
0 ms0 KiB
#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; }

컴파일 시 표준 에러 (stderr) 메시지

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