简单递推....
#include#include #include #include using namespace std;typedef long long int LL;const LL MOD=1000000007;const int maxn=100100;int t,k;LL tui[maxn];LL sum[maxn];void TUI(int k){ tui[1]=1; if(1==k) tui[1]++; tui[0]=1; sum[0]=0; sum[1]=tui[1]; for(int i=2;i =0) tui[i]=(tui[i-1]+tui[i-k])%MOD; else tui[i]=tui[i-1]%MOD; } for(int i=2;i