xdoj-1109
来源:互联网 发布:python 输入ctrl c 编辑:程序博客网 时间:2024/05/01 12:17
#include<stdio.h>#define N 10007#define maxn 1000005int dp[maxn];int main(){ dp[1]=1,dp[2]=2,dp[3]=4; for(int i=4;i<maxn;i++) dp[i]=dp[i-1]%N+dp[i-2]%N+dp[i-3]%N; int n; while(scanf("%d",&n)!=EOF) printf("%d\n",dp[n]%N);}
0 0
- xdoj-1109
- xdoj-1109
- XDOJ-1003
- xdoj 1012
- xdoj-1111
- xdoj-1042
- xdoj-1040
- xdoj-1011
- xdoj-1022
- xdoj-1056
- xdoj-1055
- xdoj-1003
- XDOJ 1181
- XDOJ 1233
- XDOJ 1213
- XDOJ 1107
- XDOJ 1229
- XDOJ 1006
- VS中为程序文件自动添加版权信息注释的方法
- 浅谈搜索剪枝
- android studio 一直卡在Gradle:Build Running的解决办法
- 字符串二叉树的实现
- struts2 result 传参数
- xdoj-1109
- xshell SSH服务器拒绝访问密码。请再试一次
- Boltzmann 玻尔兹曼机(BM)
- UIDocumentInteractionController 第三方应用中打开自己的文件 方法
- PHP命名空间 namespace 及导入 use 的用法
- java写出蛇吃蛋小游戏
- angularjs 配置路由按需加载html\js文件[不依赖第三方插件]
- C++构造函数调用顺序
- Error:Execution failed for task ':app:prepareDebugAndroidTestDependencies'.