| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 9273 | 顾郁铭 | 贴瓷砖 | C++ | Accepted | 100 | 5 MS | 248 KB | 281 | 2020-11-10 20:34:24 |
#include<bits/stdc++.h> using namespace std; int t,a[1001]; int f(int n){ if(n==1) return 1; if(n==2) return 3; return f(n-1)+2*f(n-2); } int main(){ cin>>t; for(int i=1;i<=t;i++){ cin>>a[i]; } for(int i=1;i<=t;i++){ cout<<f(a[i])<<endl; } return 0; }