Bar Codes
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=31329#problem/N
- #include<map>
- #include<set>
- #include<list>
- #include<cmath>
- #include<ctime>
- #include<deque>
- #include<stack>
- #include<bitset>
- #include<cstdio>
- #include<vector>
- #include<cstdlib>
- #include<cstring>
- #include<iomanip>
- #include<numeric>
- #include<sstream>
- #include<utility>
- #include<iostream>
- #include<algorithm>
- #include<functional>
- using namespace std ;
- int n , k , m ;
- const int maxn = 55 ;
- long long f[ maxn ][ maxn ] ;
- int main()
- {
- while( scanf( "%d%d%d" , &n , &k , &m ) != EOF )
- {
- memset( f , 0 , sizeof( f ) ) ;
- for( int i = 0 ; i <= n && i <= m ; ++i )
- {
- f[ 1 ][ i ] = 1 ;
- }
- for( int i = 2 ; i <= k ; ++i )
- {
- for( int j = i ; j <= n ; ++j )
- {
- for( int k = 1 ; k <= m && j - k > 0 ; ++k )
- {
- f[ i ][ j ] += f[ i - 1][ j - k ] ;
- }
- }
- }
- printf( "%lld\n" , f[ k ][ n ] ) ;
- }
- return 0 ;
- }
Bar Codes的更多相关文章
- 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 ...
- 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 ...
- LightOJ1191 Bar Codes(DP)
题目大概是,二进制数可以看作是由几段连续的0和连续的1组成,问:n位没有前导0的 且 共用k段连续0/1组成的 且 连续0/1个数不超过m的二进制数有多少个. 用dp[n][k][m]表示问题 dp[ ...
- DevExpress 2015.2发布 看看有哪些更新
下面是besy翻译的部分重要更新,要查看全部更新细节请访问英文官网. | 下载DevExpress 2015.2 Diagram Control 新的DevExpress Diagram Contro ...
- 【英文版本】Android开源项目分类汇总
Action Bars ActionBarSherlock Extended ActionBar FadingActionBar GlassActionBar v7 appcompat library ...
- UVA题目分类
题目 Volume 0. Getting Started 开始10055 - Hashmat the Brave Warrior 10071 - Back to High School Physics ...
- android github
Action Bars ActionBarSherlock Extended ActionBar FadingActionBar GlassActionBar v7 appcompat library ...
- Mobile Computing: the Next Decade论文 cloudlet薄云
1 Introduction “Information at your fingertips anywhere, anytime” has been the driving vision of mob ...
- ABAP--如何创建自定义打印条码
ABAP--如何创建自定义打印条码 BARCODE in Smartforms: How to create customize BARCODE for Smartforms. 1 Introduct ...
随机推荐
- TextView实现多个TextView对象的走马灯效果
1:自定义一个控件继承TextView,重写isFocused方法,返回值为true; package com.example.helloandroid; import android.R.bool; ...
- 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 ...
- CSS3框架!
http://usablica.github.io/front-end-frameworks/compare.html?v=2.0
- Android Studio does not point to a valid jvm
环境变量 JAVA_HOME的值,去掉后面的分号,一般情况下就可以启动
- java集群
java集群 分类: java学习2011-05-12 09:12 7531人阅读 评论(9) 收藏 举报 java服务器负载均衡ejb集群数据库 序言 越来越多的关键应用运行在J2EE(Java 2 ...
- foreach遍历对象的属性
<?php class MyClass { public $var1 = 'value 1' ; public $var2 = 'value 2' ; public $var3 = 'value ...
- 6月10日-IOS应用-日记本
嗯,经过这几天的学习,我的第一个IOS应用,日记本算是学习完毕了,下面写一篇日记,记录所学到的知识和需要继续学习的地方. 1,首先是ViewController,必须添加两个协议UITableView ...
- perl学习(1) 入门
Perl 被设计成90%擅长处理文本,10%处理其余的问题.因此Perl 有强大的文本处理能力,包括正则表达式. 第一个程序 hello world #! /usr/bin/perl -w use s ...
- 开发记录_自学Python写爬虫程序爬取csdn个人博客信息
每天刷开csdn的博客,看到一整个页面,其实对我而言,我只想看看访问量有没有上涨而已... 于是萌生了一个想法: 想写一个爬虫程序把csdn博客上边的访问量和评论数都爬下来. 打算通过网络各种搜集资料 ...
- 乐视(letv)网tkey破解
乐视网tkey算法频繁变动,怎样才干获得她算法的源代码,以不变应万变? 本文仅仅用于技术交流.提醒各位尊重站点版权,请勿用于其他用途,否则后果自负! 使用软件 Adobe Flash Builder ...