博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CF414BMashmokh and ACMDP
阅读量:4321 次
发布时间:2019-06-06

本文共 625 字,大约阅读时间需要 2 分钟。

无脑搜,加个记忆化。当时只过了这题和A题

#include 
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;int n,k;int dp[2222][2222];const int mod= 1e9+7;int dfs(int x,int pre){ if(~dp[x][pre]) return dp[x][pre]; if(x==k) return dp[x][pre]=1; int ret=0; for(int i= 1;i*pre<=n;i++) ret+=dfs(x+1,i*pre),ret%=mod; return dp[x][pre]=ret;}int main(){ scanf("%d%d",&n,&k); memset(dp,-1,sizeof(dp)); cout<
<

 

转载于:https://www.cnblogs.com/yigexigua/p/3907171.html

你可能感兴趣的文章
第五天站立会议内容
查看>>
最短路径(SP)问题相关算法与模板
查看>>
js算法之最常用的排序
查看>>
Python——交互式图形编程
查看>>
经典排序——希尔排序
查看>>
团队编程项目作业2-团队编程项目代码设计规范
查看>>
英特尔公司将停止910GL、915GL和915PL芯片组的生产
查看>>
Maven配置
查看>>
HttpServletRequest /HttpServletResponse
查看>>
SAM4E单片机之旅——24、使用DSP库求向量数量积
查看>>
从远程库克隆库
查看>>
codeforces Unusual Product
查看>>
hdu4348 - To the moon 可持久化线段树 区间修改 离线处理
查看>>
正则表达式的搜索和替换
查看>>
个人项目:WC
查看>>
地鼠的困境SSL1333 最大匹配
查看>>
flume+elasticsearch+kibana遇到的坑
查看>>
【MM系列】在SAP里查看数据的方法
查看>>
C#——winform
查看>>
CSS3 transform制作的漂亮的滚动式导航
查看>>