Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: kavin8888

Problemset: Amazing tiling

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-23 10:55:46

#include<bits/stdc++.h>
using namespace std;
#define spps1 ios::sync_with_stdio(false)
#define spps2 cin.tie(nullptr)
#define ll long long
ll tilling(int x)
{
	if(x==1) return 1;
	if(x==2) return 2;
	if(x==3) return 5;
	return 2*tilling(x-1)+tilling(x-3);
}
int main()
{
	spps1; spps2;
	int n; cin>>n;
	cout<<tilling(n)<<'\n';
	return 0;
}