Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: un8qe_x3

Problemset: Amazing tiling

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-29 19:47:56

#include<bits/stdc++.h>
using namespace std;
int f(int n) {
    if (n==0){return 1;}
    else if (n==1){return 1;}
    else if (n==2){return 2;}
    else {return 2*f(n-1)+f(n-3);}
}
int main() {
    int n;cin >> n;cout << f(n);
}