题目链接

附上代码:

 #include<cstdio>
#include<cstring>
#include<bits/stdc++.h> #define mod 1000000007
int n, k;
// dp[len][last]
int dp[][]; int
main(void) {
while(~scanf("%d %d",&n,&k)){
memset(dp,,sizeof(dp));
for(int i =; i <= n; i++)
dp[][i]=;
for(int i =; i <= k; i++) {
for(int j =; j <= n; j++) {
for(int t = j; t <= n; t += j){
dp[i][t]+= dp[i-][j];
dp[i][t]%= mod;
        }
      }
    }
    int ans =;
    for(int i =; i <= n; i++)
    ans =(ans + dp[k][i])% mod;
27     printf("%d\n", ans);
  }
  return0;
}

Codeforces 414B的更多相关文章

  1. Codeforces 414B Mashmokh and ACM

    http://codeforces.com/problemset/problem/414/B 题目大意: 题意:一个序列B1,B2...Bl如果是好的,必须满足Bi | Bi + 1(a | b 代表 ...

  2. codeforces 414B B. Mashmokh and ACM(dp)

    题目链接: B. Mashmokh and ACM time limit per test 1 second memory limit per test 256 megabytes input sta ...

  3. python爬虫学习(5) —— 扒一下codeforces题面

    上一次我们拿学校的URP做了个小小的demo.... 其实我们还可以把每个学生的证件照爬下来做成一个证件照校花校草评比 另外也可以写一个物理实验自动选课... 但是出于多种原因,,还是绕开这些敏感话题 ...

  4. 【Codeforces 738D】Sea Battle(贪心)

    http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n g ...

  5. 【Codeforces 738C】Road to Cinema

    http://codeforces.com/contest/738/problem/C Vasya is currently at a car rental service, and he wants ...

  6. 【Codeforces 738A】Interview with Oleg

    http://codeforces.com/contest/738/problem/A Polycarp has interviewed Oleg and has written the interv ...

  7. CodeForces - 662A Gambling Nim

    http://codeforces.com/problemset/problem/662/A 题目大意: 给定n(n <= 500000)张卡片,每张卡片的两个面都写有数字,每个面都有0.5的概 ...

  8. CodeForces - 274B Zero Tree

    http://codeforces.com/problemset/problem/274/B 题目大意: 给定你一颗树,每个点上有权值. 现在你每次取出这颗树的一颗子树(即点集和边集均是原图的子集的连 ...

  9. CodeForces - 261B Maxim and Restaurant

    http://codeforces.com/problemset/problem/261/B 题目大意:给定n个数a1-an(n<=50,ai<=50),随机打乱后,记Si=a1+a2+a ...

随机推荐

  1. day2(老男孩-Python3.5-S14期全栈开发)

    作者:赵俊            发布日期:2019/11/5 一.模块初识 import sys '''默认在当前目录下找模块,找不到再去python环境变量中寻找''' print(sys.pat ...

  2. JSP-案例-商品增删改

    商品的增删改查 1显示 部分代码 Dao public List<Product> findAllProduct() throws SQLException { QueryRunner r ...

  3. Hdu 1403(后缀数组)

    题目链接 Longest Common Substring Time Limit: 8000/4000 MS (Java/Others)    Memory Limit: 65536/32768 K ...

  4. 读书笔记--Head First Ajax 目录

    1.使用Ajax 2.设计Ajax 3.javascripte事件 4.多个事件处理程序 5.异步应用 6.文档对象模型 7.管理DOM 8.框架与工具包 9.xml请求与响应 10.json 11. ...

  5. os模块和sys模块

    1.os模块与path有关:os.path.isfile():判断置顶对象是否为文件,是返回True,否返回Falseos.path.isdir():判断指定对象是否为目录,是返回True,否返回Fa ...

  6. 二零一七年工作中常用的基本Linux命令记录(Ubuntu)

    Linux命令如下(Ubuntu): 1. apt-get install openssh-server 下载远程工具 2. apt-get install lrzsz 上传下载工具 3. apt-g ...

  7. session失效刷新后登录页面嵌入在iframe中的解决办法

    在login页面中添加以下一段代码:   var _topWin = window;  while (_topWin != _topWin.parent.window) {       _topWin ...

  8. CentOS 6.8 Java 环境搭建

      1.搜索 Java 1.7 64 2.下载 文件 3.Xshell 安装lrzsz 4.选择路径 5.使用 rz 命令选择上传 6.打开 /etc/profile vim /etc/profile ...

  9. PHP获取真实客户端的真实IP的方法

    REMOTE_ADDR 是你的客户端跟你的服务器“握手”时候的IP.如果使用了“匿名代理”,REMOTE_ADDR将显示代理服务器的IP. HTTP_CLIENT_IP 是代理服务器发送的HTTP头. ...

  10. HR招聘_(五)_招聘方法论(电话邀约)

    .主动候选人 这部分候选人通过职位广告直接投递,大多对公司意愿度高(排除少数海投候选人),所以电话中一般需要了解如下信息: 目前状态,在职还是离职: 离职原因以及真实诉求: 岗位职责和团队情况: 薪资 ...