Filling Shapes

You have a given integer nn. Find the number of ways to fill all 3×n3×n tiles with the shape described in the picture below. Upon filling, no empty spaces are allowed. Shapes cannot overlap.
Filling Shapes
This picture describes when n=4n=4. The left one is the shape and the right one is 3×n3×n tiles.
Input
The only line contains one integer nn (1≤n≤601≤n≤60) — the length.

Output
Print the number of ways to fill.

Examples
Input
4
Output
4
Input
1
Output
0

这个题意是用那个左边的填满右边的,右边图是一个3*n的规格。
老套路,拿笔画一画连蒙带猜发现有规律,n奇数和偶数情况不一样,然后写代码就是了。
#include
#include
using namespace std;
int main()
{
int n;
cin>>n;
if(n%2) cout<<“0”<<endl;//奇数全部填不满
else//偶数的情况
{
int k;
k=(int)pow(2,n/2);//math下的一个函数,不会可以查一下
cout<<k<<endl;
}
return 0;
}
感谢观看!