# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
267156 | 2020-08-15T22:19:14 Z | peuch | Fibonacci representations (CEOI18_fib) | C++17 | 68 ms | 632 KB |
#include<bits/stdc++.h> using namespace std; const int MAXN = 20; int n; int f[MAXN]; int sum; int ans[2000000]; int main(){ f[1] = 1; f[2] = 2; for(int i = 3; i <= 20; i++){ f[i] = f[i - 1] + f[i - 2]; } for(int i = 0; i < (1<<20); i++){ int aux = 0; for(int k = 0; k < 20; k++) if(i & (1<<k)) aux += f[k + 1]; ans[aux]++; } scanf("%d", &n); for(int i = 1; i <= n; i++){ int aux; scanf("%d", &aux); sum += f[aux]; printf("%d\n", ans[sum]); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 66 ms | 504 KB | Output is correct |
2 | Correct | 65 ms | 384 KB | Output is correct |
3 | Correct | 66 ms | 384 KB | Output is correct |
4 | Correct | 66 ms | 384 KB | Output is correct |
5 | Correct | 66 ms | 504 KB | Output is correct |
6 | Correct | 67 ms | 384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 66 ms | 504 KB | Output is correct |
2 | Correct | 65 ms | 384 KB | Output is correct |
3 | Correct | 66 ms | 384 KB | Output is correct |
4 | Correct | 66 ms | 384 KB | Output is correct |
5 | Correct | 66 ms | 504 KB | Output is correct |
6 | Correct | 67 ms | 384 KB | Output is correct |
7 | Correct | 66 ms | 384 KB | Output is correct |
8 | Runtime error | 68 ms | 632 KB | Execution killed with signal 11 |
9 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 66 ms | 632 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 66 ms | 504 KB | Output is correct |
2 | Correct | 65 ms | 384 KB | Output is correct |
3 | Correct | 66 ms | 384 KB | Output is correct |
4 | Correct | 66 ms | 384 KB | Output is correct |
5 | Correct | 66 ms | 504 KB | Output is correct |
6 | Correct | 67 ms | 384 KB | Output is correct |
7 | Correct | 66 ms | 384 KB | Output is correct |
8 | Runtime error | 68 ms | 632 KB | Execution killed with signal 11 |
9 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 67 ms | 632 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 66 ms | 504 KB | Output is correct |
2 | Correct | 65 ms | 384 KB | Output is correct |
3 | Correct | 66 ms | 384 KB | Output is correct |
4 | Correct | 66 ms | 384 KB | Output is correct |
5 | Correct | 66 ms | 504 KB | Output is correct |
6 | Correct | 67 ms | 384 KB | Output is correct |
7 | Correct | 66 ms | 384 KB | Output is correct |
8 | Runtime error | 68 ms | 632 KB | Execution killed with signal 11 |
9 | Halted | 0 ms | 0 KB | - |