http://acm.hust.edu.cn/vjudge/contest/view.action?cid=31329#problem/N

  1. #include<map>
  2. #include<set>
  3. #include<list>
  4. #include<cmath>
  5. #include<ctime>
  6. #include<deque>
  7. #include<stack>
  8. #include<bitset>
  9. #include<cstdio>
  10. #include<vector>
  11. #include<cstdlib>
  12. #include<cstring>
  13. #include<iomanip>
  14. #include<numeric>
  15. #include<sstream>
  16. #include<utility>
  17. #include<iostream>
  18. #include<algorithm>
  19. #include<functional>
  20.  
  21. using namespace std ;
  22. int n , k , m ;
  23. const int maxn = 55 ;
  24. long long f[ maxn ][ maxn ] ;
  25.  
  26. int main()
  27. {
  28. while( scanf( "%d%d%d" , &n , &k , &m ) != EOF )
  29. {
  30. memset( f , 0 , sizeof( f ) ) ;
  31. for( int i = 0 ; i <= n && i <= m ; ++i )
  32. {
  33. f[ 1 ][ i ] = 1 ;
  34. }
  35. for( int i = 2 ; i <= k ; ++i )
  36. {
  37. for( int j = i ; j <= n ; ++j )
  38. {
  39. for( int k = 1 ; k <= m && j - k > 0 ; ++k )
  40. {
  41. f[ i ][ j ] += f[ i - 1][ j - k ] ;
  42. }
  43. }
  44. }
  45. printf( "%lld\n" , f[ k ][ n ] ) ;
  46. }
  47. return 0 ;
  48. }

Bar Codes的更多相关文章

  1. Bar codes in NetSuite Saved Searches(transport/reprint)

    THIS IS A COPY FROM BLOG Ways of incorporating Bar Codes into your Netsuite Saved Searches.    Code ...

  2. uva 10721 - Bar Codes(dp)

    题目链接:uva 10721 - Bar Codes 题目大意:给出n,k和m,用k个1~m的数组成n,问有几种组成方法. 解题思路:简单dp,cnt[i][j]表示用i个数组成j, cnt[i][j ...

  3. LightOJ1191 Bar Codes(DP)

    题目大概是,二进制数可以看作是由几段连续的0和连续的1组成,问:n位没有前导0的 且 共用k段连续0/1组成的 且 连续0/1个数不超过m的二进制数有多少个. 用dp[n][k][m]表示问题 dp[ ...

  4. DevExpress 2015.2发布 看看有哪些更新

    下面是besy翻译的部分重要更新,要查看全部更新细节请访问英文官网. | 下载DevExpress 2015.2 Diagram Control 新的DevExpress Diagram Contro ...

  5. 【英文版本】Android开源项目分类汇总

    Action Bars ActionBarSherlock Extended ActionBar FadingActionBar GlassActionBar v7 appcompat library ...

  6. UVA题目分类

    题目 Volume 0. Getting Started 开始10055 - Hashmat the Brave Warrior 10071 - Back to High School Physics ...

  7. android github

    Action Bars ActionBarSherlock Extended ActionBar FadingActionBar GlassActionBar v7 appcompat library ...

  8. Mobile Computing: the Next Decade论文 cloudlet薄云

    1 Introduction “Information at your fingertips anywhere, anytime” has been the driving vision of mob ...

  9. ABAP--如何创建自定义打印条码

    ABAP--如何创建自定义打印条码 BARCODE in Smartforms: How to create customize BARCODE for Smartforms. 1 Introduct ...

随机推荐

  1. TextView实现多个TextView对象的走马灯效果

    1:自定义一个控件继承TextView,重写isFocused方法,返回值为true; package com.example.helloandroid; import android.R.bool; ...

  2. Quiz 6b Question 7————An Introduction to Interactive Programming in Python

     Question 7 Convert the following English description into code. Initialize n to be 1000. Initiali ...

  3. CSS3框架!

    http://usablica.github.io/front-end-frameworks/compare.html?v=2.0

  4. Android Studio does not point to a valid jvm

    环境变量 JAVA_HOME的值,去掉后面的分号,一般情况下就可以启动

  5. java集群

    java集群 分类: java学习2011-05-12 09:12 7531人阅读 评论(9) 收藏 举报 java服务器负载均衡ejb集群数据库 序言 越来越多的关键应用运行在J2EE(Java 2 ...

  6. foreach遍历对象的属性

    <?php class MyClass { public $var1 = 'value 1' ; public $var2 = 'value 2' ; public $var3 = 'value ...

  7. 6月10日-IOS应用-日记本

    嗯,经过这几天的学习,我的第一个IOS应用,日记本算是学习完毕了,下面写一篇日记,记录所学到的知识和需要继续学习的地方. 1,首先是ViewController,必须添加两个协议UITableView ...

  8. perl学习(1) 入门

    Perl 被设计成90%擅长处理文本,10%处理其余的问题.因此Perl 有强大的文本处理能力,包括正则表达式. 第一个程序 hello world #! /usr/bin/perl -w use s ...

  9. 开发记录_自学Python写爬虫程序爬取csdn个人博客信息

    每天刷开csdn的博客,看到一整个页面,其实对我而言,我只想看看访问量有没有上涨而已... 于是萌生了一个想法: 想写一个爬虫程序把csdn博客上边的访问量和评论数都爬下来. 打算通过网络各种搜集资料 ...

  10. 乐视(letv)网tkey破解

    乐视网tkey算法频繁变动,怎样才干获得她算法的源代码,以不变应万变? 本文仅仅用于技术交流.提醒各位尊重站点版权,请勿用于其他用途,否则后果自负! 使用软件 Adobe Flash Builder ...