#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
vector<long long>pre(21);
pre[0]=1;
pre[1]=2;
for(int i=2;i<21;i++){
pre[i]=pre[i-1]+pre[i-2];
}
int n;
cin>>n;
long long now=0;
vector<long long>v(n);
for(int i=0;i<n;i++){
cin>>v[i];
}
for(int i=0;i<n;i++){
now+=pre[v[i]-1];
int res=0;
for(int i=1;i<(1<<21);i++){
long long fake=0;
for(int j=0;j<21;j++){
if((i>>j)&1){
fake+=pre[j];
}
}
if(fake==now){
res++;
}
}
cout<<res<<"\n";
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1089 ms |
296 KB |
Output is correct |
2 |
Correct |
1708 ms |
300 KB |
Output is correct |
3 |
Correct |
1648 ms |
300 KB |
Output is correct |
4 |
Correct |
124 ms |
300 KB |
Output is correct |
5 |
Correct |
1562 ms |
296 KB |
Output is correct |
6 |
Correct |
1732 ms |
300 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1089 ms |
296 KB |
Output is correct |
2 |
Correct |
1708 ms |
300 KB |
Output is correct |
3 |
Correct |
1648 ms |
300 KB |
Output is correct |
4 |
Correct |
124 ms |
300 KB |
Output is correct |
5 |
Correct |
1562 ms |
296 KB |
Output is correct |
6 |
Correct |
1732 ms |
300 KB |
Output is correct |
7 |
Execution timed out |
4046 ms |
212 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3505 ms |
300 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1089 ms |
296 KB |
Output is correct |
2 |
Correct |
1708 ms |
300 KB |
Output is correct |
3 |
Correct |
1648 ms |
300 KB |
Output is correct |
4 |
Correct |
124 ms |
300 KB |
Output is correct |
5 |
Correct |
1562 ms |
296 KB |
Output is correct |
6 |
Correct |
1732 ms |
300 KB |
Output is correct |
7 |
Execution timed out |
4046 ms |
212 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1089 ms |
296 KB |
Output is correct |
2 |
Correct |
1708 ms |
300 KB |
Output is correct |
3 |
Correct |
1648 ms |
300 KB |
Output is correct |
4 |
Correct |
124 ms |
300 KB |
Output is correct |
5 |
Correct |
1562 ms |
296 KB |
Output is correct |
6 |
Correct |
1732 ms |
300 KB |
Output is correct |
7 |
Execution timed out |
4046 ms |
212 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |