![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
递推
文章平均质量分 79
nudt_oys
An AC a day,keeps WA away~
展开
-
CSUOJ 1284 Cutting Cake(递推)
1284: Cutting CakeDescription一个蛋糕切N刀,最多能得到多少块?切的过程中不能改变任意一块蛋糕的位置。Input输入数据的第一行包含一个整数T (1 ,表示接下来一共有T组测试数据。每组测试数据占一行,包含一个整数N (1 ,含义同上。Output用一行输出一个整数,原创 2016-07-13 20:36:07 · 786 阅读 · 0 评论 -
CSUOJ 1772 漫漫上学路(卡特兰数 || 递推)
1772: 漫漫上学路Description对于csuxushu来说,能够在CSU(California State University)上学是他一生的荣幸。CSU校园内的道路设计的十分精巧,由n+1条水平道路和n+1条竖直道路等距交错而成,充分体现了校园深厚的文化底蕴。然而不幸的是CS市每到夏季,天降大雨,使得CSU常常形成“CS海”的奇观,今年,也就是2016年同原创 2016-07-10 14:10:05 · 1621 阅读 · 0 评论 -
LeetCode 258 Add Digits(技巧 || 递归)
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has only o原创 2017-04-19 20:13:04 · 406 阅读 · 0 评论 -
LeetCode 70 Climbing Stairs(记忆化搜索)
You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will be a positive原创 2017-05-13 13:09:34 · 1106 阅读 · 0 评论 -
LeetCode 38 Count and Say(字符串生成)
The count-and-say sequence is the sequence of integers with the first five terms as following:1. 12. 113. 214. 12115. 1112211 is read off as "one 1" or 11.11 is read o原创 2017-07-08 08:47:08 · 2964 阅读 · 1 评论