题目:http://acm.hdu.edu.cn/showproblem.php?pid=5366
代码:
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
int a;
__int64 b[100]={0,1,2,3,5,8,13};
while(~scanf("%d",&a))
{
for(int i=3;i<=a;i++)
{
b[i]=b[i-1]+b[i-3]+1; //too difficult
}
printf("%I64d\n",b[a]);
}
}