Buy the Ticket HDU 1133】的更多相关文章

题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=1133 题目大意: 有m+n个人去买电影票,每张电影票50元,  m个人是只有50元一张的,  n个人是只有100元一张的, 电影院自己本身是没有零钱的. 那么要收到100元的钱必须找人家50, 那么再次之前就必须 收到一个50元的, 问你有多少种不同的排列方式. (注意: 这里每个人都看成了不同的元素) 题目分析: 我们要是能找人家钱首先必须要有 m >= n 我们dp[m][n] 再加一个人 只…
传送门 [http://acm.hdu.edu.cn/showproblem.php?pid=1133] 题目描述和分析 代码 #include<iostream> #include<string.h> using namespace std; void Multiply(int a[],int z)//大数a[]和小数z相乘,结果存储在a[]中 { int maxn = 2000; int c = 0; for(int j=maxn-1;j>=0;j--)//用z乘以a[]…
Problem Description The "Harry Potter and the Goblet of Fire" will be on show in the next few days. As a crazy fan of Harry Potter, you will go to the cinema and have the first sight, won’t you? Suppose the cinema only has one ticket-office and…
题意: 演唱会门票售票处,那里最开始没有零钱.每一张门票是50元,人们只会拿着100元和50元去买票,有n个人是拿着50元买票,m个人拿着100元去买票. n+m个人按照某个顺序按序买票,如果一个人拿着100元买票,而你没有零钱去找给他,那么买票结束. 题目问你,这n+m个人按照某个顺序按序买票,中间买票没有暂停的排队方式有多少种 题解: 我们设dp[i][j]表示一共有i个人,其中有j个人拿着50元买票的有效排队方式 说一下转移方程: 如果第i个人准备在前i-1个人的排队方式基础上拿着50元去…
Buy the Ticket Problem Description The "Harry Potter and the Goblet of Fire" will be on show in the next few days. As a crazy fan of Harry Potter, you will go to the cinema and have the first sight, won’t you? Suppose the cinema only has one tic…
Buy the Ticket Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5651    Accepted Submission(s): 2357 Problem Description The "Harry Potter and the Goblet of Fire" will be on show in the nex…
Buy the Ticket Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4185    Accepted Submission(s): 1759 Problem Description The "Harry Potter and the Goblet of Fire" will be on show in the next…
Buy the Ticket Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7152    Accepted Submission(s): 2998 Problem Description The "Harry Potter and the Goblet of Fire" will be on show in the nex…
Buy the Ticket Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8838    Accepted Submission(s): 3684 Problem Description The "Harry Potter and the Goblet of Fire" will be on show in the next…
Buy the Ticket Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3614    Accepted Submission(s): 1522 Problem Description The "Harry Potter and the Goblet of Fire" will be on show in the next…