题目链接

附上代码:

 #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. add-apt-repository ppa:<ppa_name>

    add-apt-repository: add-apt-repository 是由 python-software-properties 这个工具包提供的 所以要先安装python-software- ...

  2. liunx定时删除文件(产生的日志.........)

    linux是一个很能自动产生文件的系统,日志.邮件.备份等.虽然现在硬盘廉价,我们可以有很多硬盘空间供这些文件浪费,让系统定时清理一些不需要的文件很有一种爽快的事情.不用你去每天惦记着是否需要清理日志 ...

  3. LintCode_100 删除排序数组中的重复数字 ||

    题目 跟进“删除重复数字”: 如果可以允许出现两次重复将如何处理? 样例 给出数组A =[1,1,1,2,2,3],你的函数应该返回长度5,此时A=[1,1,2,2,3]. C++代码 int rem ...

  4. Mybatis insert返回主键ID

    Mybatis insert语句书写 <insert id="insertSelective" useGeneratedKeys="true" keyPr ...

  5. 本地项目上传git@osc

    本地项目使用eclipse的git插件上传到开元中国社区的代码托管平台 1.在托管平台新建项目 2.使用eclipse的git repositories ,在URI中输入新建项目的https路径; 验 ...

  6. 【Scala学习笔记】一、函数式编程的思想

    1. 函数是头等值.     在函数编程中,函数也是值,与整数和字符串处于同一地位.函数可以像变量一样被创建,修改,并当成变量一样传递,返回或是在函数中嵌套函数. 函数可以当做参数传递给其他函数.   ...

  7. angular 项目迭代+记录采坑

    年中的时候 正在做的项目来了新的领导 给我们的NG4项目来了一次大整顿. 我们公司项目基本都是敏捷开发--> 开发出一个成熟的shared目录(里面有所有的公用组件 公用服务 公用工具类) 然后 ...

  8. GIT → 05:Git命令行操作

    5.1 打开命令行窗口 安装Git后,在资源管理器的空白处,单击鼠标右键打开窗口,点击 Git Bash Here ,打开Git命令行窗口,在窗口中可直接使用Linux命令操作: 5.2 初始化Git ...

  9. flask的基本操作

    常用的SQLAlchemy字段类型 # coding:utf-8 from flask import Flask from flask_sqlalchemy import SQLAlchemy app ...

  10. Linux 中查询 CPU 的核数的方法

    以一台 Linux 服务器为例.这台 Linux 包括两颗 Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz CPU, 单颗 CPU 包括 10 个 cpu core ...