ICPC-递推与组合
文章平均质量分 84
有关递推与组合的题解
海岛Blog
专注于程序设计及其竞赛,专注于集成电路EDA设计
展开
-
UVA10519 Really Strange【大数+递推】
Raju has recently passed BSc. Engineering in Computer Science & Engineering from BUET (Bangladesh University of Extraordinary Talents), the best university of Bangladesh. After passing, he has been appointed manager of BCS (Bangladesh Calculation Socie原创 2022-04-29 08:32:58 · 245 阅读 · 1 评论 -
UVA10254 The Priest Mathematician【大数+递推】
The ancient folklore behind the “Towers of Hanoi” puzzle invented by E. Lucas in 1883 is quite well known to us. One more recent legend tells us that the Brahmin monks from Benares never believed that the world could vanish at the moment they finished to t原创 2022-04-29 07:59:51 · 347 阅读 · 0 评论 -
UVA10157 Expressions【大数+递推】
Let X be the set of correctly built parenthesis expressions. The elements of X are strings consisting only of the characters ‘(’ and ‘)’. The set X is defined as follows:• an empty string belongs to X• if A belongs to X, then (A) belongs to X• if both A原创 2022-04-29 00:00:30 · 161 阅读 · 0 评论 -
UVA10247 Complete Tree Labeling【大数+递推】
A complete k-ary tree is a k-ary tree in which all leaves have same depth and all internal nodes have degree k. This k is also known as the branching factor of a tree. It is very easy to determine the number of nodes of such a tree. Given the depth and bra原创 2022-04-28 21:18:57 · 668 阅读 · 0 评论 -
UVA10516 Another Counting Problem【大数+递推】
Tree is an important data structure in Computer Science. Of all trees we work with, Binary Tree is probably the most popular one. A Binary Tree is called Strictly Binary Tree if every nonleaf node in a binary tree has nonempty left and right subtrees. Let原创 2022-04-28 20:42:06 · 246 阅读 · 0 评论 -
UVA10128 Queue【递推】
There is a queue with N people. Every person has a different heigth. We can see P people, when we are looking from the beginning, and R people, when we are looking from the end. Its because they are having different height and they are covering each other.原创 2021-05-29 17:34:47 · 228 阅读 · 0 评论 -
UVA10465 Homer Simpson【递推】
Homer Simpson, a very smart guy, likes eating Krusty-burgers. It takes Homer m minutes to eat a Krusty-burger. However, there’s a new type of burger in Apu’s Kwik-e-Mart. Homer likes those too. It takes him n minutes to eat one of these burgers. Given t mi原创 2021-05-29 16:15:20 · 281 阅读 · 0 评论 -
UVA10943 How do you add【递推打表】
Larry is very bad at math — he usually uses a calculator, which worked well throughout college. Unforunately, he is now struck in a deserted island with his good buddy Ryan after a snowboarding accident. They’re now trying to spend原创 2021-05-29 12:35:34 · 167 阅读 · 0 评论 -
UVA11137 Ingenuous Cubrency【递推】
People in Cubeland use cubic coins. Not only the unit of currency is called a cube but also the coins are shaped like cubes and their values are cubes. Coins with values of all cubic numbers up to 9261(= 213), i.e., coins with the denominations of 1, 8, 27原创 2021-05-29 11:53:28 · 188 阅读 · 0 评论 -
UVA11310 Delivery Debacle【铺砖问题】
Wolfgang Puck has two very peculiar habits:• I. He only makes two shapes of cakes. One is square and has an area of one unit. The other is L-shaped and has an area of three units.• II. He will only deliver cakes packed in very specific box sizes. The box原创 2021-05-22 01:56:12 · 209 阅读 · 0 评论 -
UVA11161 Help My Brother (II)【大数+递推】
A Fibonacci sequence is calculated by adding the previous two members of the sequence, with the first two members being both 1.f(1)=1,f(2)=1,f(n>2)=f(n−1)+f(n−2)f(1) = 1, f(2) = 1, f(n > 2) = f(n − 1) + f(n − 2)f(1)=1,f(2)=1,f(n>2)=f(n−1)+f(n−2)原创 2021-05-08 07:26:17 · 175 阅读 · 0 评论 -
UVA10497 Sweet Child Makes Trouble【大数+递推】
Children are always sweet but they can sometimes make you feel bitter. In this problem, you will see how Tintin, a five year’s old boy, creates trouble for his parents. Tintin is a joyful boy and is always busy in doing something. But what he does is not a原创 2021-05-08 07:12:27 · 277 阅读 · 0 评论 -
UVA10198 Counting【大数+递推】
Gustavo knows how to count, but he is now learning how write numbers. As he is a very good student, he already learned 1, 2, 3 and 4. But he didn’t realize yet that 4 is different than 1, so he thinks that 4 is another way to write 1. Besides that, he is h原创 2021-05-08 06:47:23 · 288 阅读 · 0 评论 -
UVA1224 LA3904 Tile Code【铺砖问题】
The city of Songpa is now carrying out a project to build a bicycle transportation system called green Songpa. By the end of this year, citizens and visitors alike will be able to pick up and drop off bicycles throughout the city. Recently, it was decided原创 2021-05-05 07:24:29 · 228 阅读 · 0 评论 -
HDU1290 重建希望小学【递推+打表】
悼念512汶川大地震遇难同胞——重建希望小学Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10010 Accepted Submission(s): 6636Problem Description下面是512汶川大地震部分受...原创 2020-05-07 17:26:19 · 520 阅读 · 0 评论 -
HDU2085 核反应堆【递推】
核反应堆Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 28690 Accepted Submission(s): 12541Problem Description某核反应堆有两类事件发生:高能质点碰击核子时,质点被吸收,放...原创 2020-05-05 00:35:57 · 630 阅读 · 0 评论 -
HDU2077 汉诺塔IV【递推+打表】
汉诺塔IVTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13298 Accepted Submission(s): 9176Problem Description还记得汉诺塔III吗?他的规则是这样的:不允许直接从最左(右)...原创 2020-05-04 21:04:45 · 477 阅读 · 0 评论 -
HDU2501 Tiling_easy version【递推+打表】
Tiling_easy versionTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11792 Accepted Submission(s): 8974Problem Description有一个大小是 2 x n 的网格,...原创 2020-04-28 10:27:48 · 430 阅读 · 0 评论 -
HDU2050 折线分割平面【切割平面】
折线分割平面Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 48678 Accepted Submission(s): 31973Problem Description我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变...原创 2020-03-11 17:17:21 · 267 阅读 · 0 评论 -
UVA580 Critical Mass【递推】
During the early stages of the Manhattan Project, the dangers of the new radioctive materials were not widely known. Vast new factory cities were built to manufacture uranium and plu- tonium in bulk. ...原创 2020-03-09 21:14:02 · 261 阅读 · 0 评论 -
UVA11069 A Graph Problem【递推】
Given an undirected graph of the following form with n nodes, 1 ≤ n ≤ 76: Your task is to calculate the number of subsets of nodes of the graph with the following properties:&...原创 2020-03-07 21:38:20 · 337 阅读 · 0 评论 -
HDU2569 彼岸【打表+记忆化递归】
彼岸Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5630 Accepted Submission(s): 3254Problem Description突破蝙蝠的包围,yifenfei来到一处悬崖面前,悬崖彼岸就是前进的方...原创 2019-01-27 08:31:54 · 881 阅读 · 0 评论 -
UVA417 LA5392 POJ1496 HDU1336 ZOJ1342 Word Index【map+queue+递推组合】
Word IndexTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 5333 Accepted: 3011DescriptionEncoding schemes are often used in situations requiring encryption or information storage/transm...原创 2019-05-16 08:42:51 · 465 阅读 · 0 评论 -
HDU2042 不容易系列之二【递推】
不容易系列之二Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33645 Accepted Submission(s): 26898Problem Description你活的不容易,我活的不容易,他活的也不容易。不过,如果你看了下面...原创 2018-03-02 16:12:18 · 723 阅读 · 0 评论 -
HDU2045 不容易系列之(3)—— LELE的RPG难题【递推】
不容易系列之(3)—— LELE的RPG难题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 57627 Accepted Submission(s): 23124Problem Description人称“AC原创 2017-12-10 21:43:28 · 1794 阅读 · 0 评论 -
HDU2563 统计问题【递推+打表】
统计问题Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10928 Accepted Submission(s): 6379Problem Description在一无限大的二维平面中,我们做如下假设:1、 每次只能移动一...原创 2019-01-12 22:00:28 · 403 阅读 · 0 评论 -
POJ3014 Cake Pieces and Plates【整数划分+DP】
Cake Pieces and PlatesTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 6810 Accepted: 2168Case Time Limit: 1000MSDescriptionkcm1700, ntopia, suby, classic, tkwons, and their friends a...原创 2018-12-26 02:21:20 · 375 阅读 · 0 评论 -
HDU1028 Ignatius and the Princess III【整数划分+记忆化递归】
Ignatius and the Princess IIITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 26672 Accepted Submission(s): 18371Problem Description“Well,...原创 2018-12-24 08:53:09 · 921 阅读 · 0 评论 -
HDU2049 不容易系列之(4)——考新郎【递推】
不容易系列之(4)——考新郎Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 41398 Accepted Submission(s): 15223Problem Description国庆期间,省城HZ刚刚举行原创 2017-12-16 08:17:26 · 1119 阅读 · 0 评论 -
HDU1297 Children’s Queue【递推+大整数】
Children’s QueueTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15778 Accepted Submission(s): 5256Problem DescriptionThere are ma原创 2016-05-29 05:50:06 · 2618 阅读 · 2 评论 -
HDU2047 阿牛的EOF牛肉串【递推】
阿牛的EOF牛肉串Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 39626 Accepted Submission(s): 18636Problem Description今年的ACM暑期集训队一共有18人,原创 2017-12-12 08:28:40 · 1118 阅读 · 0 评论 -
HDU2048 神、上帝以及老天爷【递推】
神、上帝以及老天爷Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 44588 Accepted Submission(s): 18184Problem DescriptionHDU 2006'10 ACM co原创 2017-12-15 00:44:58 · 1087 阅读 · 0 评论 -
HDU2041 超级楼梯【递推+水题】
超级楼梯Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 64079 Accepted Submission(s): 32801Problem Description有一楼梯共M级,刚开始时你在第一级,若每次只能原创 2016-07-08 12:17:21 · 7858 阅读 · 0 评论 -
HDU2502 月之数【递推】
月之数Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11024 Accepted Submission(s): 6477Problem Description当寒月还在读大一的时候,他在一本武林秘籍中(据后来原创 2016-06-04 07:44:55 · 3269 阅读 · 0 评论 -
HDU1865 1sting【递推】
1stingTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6317 Accepted Submission(s): 2453Problem DescriptionYou will be given a str原创 2016-05-28 08:57:25 · 1720 阅读 · 0 评论 -
POJ1664 放苹果【递推+记忆化递归】
放苹果Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 35209 Accepted: 21792 Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。Input...原创 2017-05-03 08:22:45 · 3702 阅读 · 0 评论 -
HDU2046 骨牌铺方格【递推】
骨牌铺方格Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 56741 Accepted Submission(s): 27470Problem Description在2×n的一个长方形方格中,用一个1× 2的原创 2016-07-09 08:48:42 · 5292 阅读 · 0 评论 -
HDU2044 一只小蜜蜂...【递推】
一只小蜜蜂...Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 81160 Accepted Submission(s): 29106Problem Description有一只经过训练的蜜蜂只能爬向右侧相邻的原创 2016-07-08 23:22:36 · 7115 阅读 · 2 评论 -
HDU2050 折线分割平面【组合】
折线分割平面Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33827 Accepted Submission(s): 22712Problem Description我们看到过很多直线分割平面的题目,今天的这原创 2017-12-16 08:26:12 · 760 阅读 · 0 评论 -
HDU1210 Eddy's 洗牌问题【递推函数+模拟】
Eddy's 洗牌问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4890 Accepted Submission(s): 3275Problem DescriptionEddy是个ACMer,他不仅喜欢做原创 2017-06-08 10:22:35 · 2203 阅读 · 0 评论