动态规划---------递推DP
Whowell
欢迎自荐或推荐实习/校招(字节)!
加油,加油,朝着自己的梦想!!!!!
展开
-
Kirill the Gardener 3 URAL - 2072
2072. Kirill the Gardener 3Time limit: 2.0 secondMemory limit: 64 MBKirill the gardener has got a new task. He has to water the flowers growing on the huge flowerbed! It should be mentioned that the b...原创 2018-05-17 09:03:04 · 294 阅读 · 0 评论 -
Communication Fiend URAL - 1741 [递推dp/最短路SPFA]
1741. Communication FiendTime limit: 1.0 secondMemory limit: 64 MBKolya has returned from a summer camp and now he's a real communication fiend. He spends all his free time on the Web chatting with hi...原创 2018-05-29 16:13:14 · 188 阅读 · 0 评论 -
Sense of Beauty URAL - 1501 [ dp + dfs记忆化搜索]
1501. Sense of BeautyTime limit: 0.5 secondMemory limit: 64 MBThe owner of a casino for New Russians has a very refined sense of beauty. For example, after a game there remain two piles with the same ...原创 2018-05-29 19:53:30 · 179 阅读 · 0 评论 -
L2-008. 最长对称子串
L2-008. 最长对称子串递归超时,改用递推。。。。代码:#include <bits/stdc++.h>#include <algorithm>using namespace std;int const MAX = 505;int const INF = 0x3fffffff;int be[MAX], mi[MAX], len;string s;int d...原创 2018-03-24 13:40:03 · 128 阅读 · 0 评论 -
Codeforces 987 C. Three displays [思维 +递推dp]
C. Three displaystime limit per tes :1 secondmemory limit per test :256 megabytesinput :standard inputoutput :standard outputIt is the middle of 2018 and Maria Stepanovna, who lives outside Krasnokame...原创 2018-05-30 09:54:37 · 713 阅读 · 0 评论 -
Intervals of Monotonicity URAL - 1346 [递推dp]
1346. Intervals of MonotonicityTime limit: 1.0 secondMemory limit: 64 MBIt’s well known that a domain of any continuous function may be divided into intervals where the function would increase monoton...原创 2018-05-31 14:39:22 · 164 阅读 · 0 评论 -
Ignatius and the Princess IV HDU - 1029
Ignatius and the Princess IVTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32767 K (Java/Others)Total Submission(s): 40385 Accepted Submission(s): 17600Problem Description"OK, you ar...原创 2018-04-12 20:28:02 · 120 阅读 · 0 评论 -
免费馅饼_HDU - 1176_DP
免费馅饼Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 59338 Accepted Submission(s): 20817Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上...原创 2018-04-15 10:34:13 · 249 阅读 · 0 评论 -
2018 ccpc camp day 1 E. Growth [ 离散化 + dp ]
Problem E. Growth题解: 艰难的补题中...题目中m,x,y都很大,但是n只有1000,所以就将x,y离散化(因为递增可以算是跨越式的);把奖励的x拿出来从小到大排序,得到。把奖励的y拿出来从小到大排序,得到。用表示 a 值到达,b 值达到时接下来每天可以得到的奖励。其中为满足...原创 2018-08-15 11:36:31 · 308 阅读 · 0 评论 -
Codeforces 981 D. Bookshelves [dp + 贪心]
D. Bookshelvestime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputMr Keks is a typical white-collar in Byteland.He has a bookshelf in his office wi...原创 2018-05-28 15:53:47 · 384 阅读 · 0 评论 -
Binary Lexicographic Sequence URAL - 1081
1081. Binary Lexicographic SequenceTime limit: 0.5 secondMemory limit: 64 MBConsider all the sequences with length (0 < N < 44), containing only the elements 0 and 1, and no two ones are adjacen...原创 2018-05-27 00:46:54 · 109 阅读 · 0 评论 -
URAL 1225. Flags [递推DP求种类数]
1225. FlagsTime limit: 1.0 secondMemory limit: 64 MBOn the Day of the Flag of Russia a shop-owner decided to decorate the show-window of his shop with textile stripes of white, blue and red colors. He...原创 2018-05-07 09:54:30 · 175 阅读 · 0 评论 -
Staircases URAL - 1017 [递推]
1017. StaircasesTime limit: 1.0 secondMemory limit: 64 MBOne curious child has a set of N little bricks (5 ≤ N ≤ 500). From these bricks he builds different staircases. Staircase consists of steps of ...原创 2018-05-14 20:05:22 · 299 阅读 · 0 评论 -
URAL 1009. K-based Numbers [递推DP]
1009. K-based NumbersTime limit: 0.5 secondMemory limit: 64 MBLet’s consider K-based numbers, containing exactly N digits. We define a number to be valid if its K-based notation doesn’t contain two su...原创 2018-05-08 10:16:05 · 168 阅读 · 0 评论 -
The Debut Album URAL - 2018[滚动数组递推DP]
2018. The Debut AlbumTime limit: 2.0 secondMemory limit: 64 MBPop-group “Pink elephant” entered on recording their debut album. In fact they have only two songs: “My love” and “I miss you”, but each o...原创 2018-05-08 12:37:36 · 120 阅读 · 0 评论 -
K-based Numbers. Version 3 URAL - 1013 [递推+矩阵快速幂]
1013. K-based Numbers. Version 3Time limit: 0.5 secondMemory limit: 64 MBLet’s consider K-based numbers, containing exactly N digits. We define a number to be valid if its K-based notation doesn’t con...原创 2018-05-26 10:30:31 · 225 阅读 · 0 评论 -
K-based Numbers. Version 2 URAL - 1012 [dp + java大数]
1012. K-based Numbers. Version 2Time limit: 0.5 secondMemory limit: 16 MBLet’s consider K-based numbers, containing exactly N digits. We define a number to be valid if its K-based notation doesn’t con...原创 2018-05-15 20:57:28 · 187 阅读 · 0 评论 -
Sum of Digits URAL - 1658 [数位dp+递推dp]
1658. Sum of DigitsTime limit: 2.0 secondMemory limit: 64 MBPetka thought of a positive integer n and reported to Chapaev the sum of its digits and the sum of its squared digits. Chapaev scratched his...原创 2018-05-26 20:22:02 · 297 阅读 · 0 评论 -
Codeforces Round #483 [Thanks, Botan Investments and Victor Shaburov!] Editoral
T1:A. Gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputTwo players play a game.Initially there are nn integers a1,a2,…,ana1,a2,…,an written on ...原创 2018-05-16 16:31:40 · 274 阅读 · 0 评论 -
Chernobyl’ Eagle on a Roof URAL - 1223[递推dp]
题目:有n个鸡蛋,m层的楼房,假设所有鸡蛋的坚硬程度都是一样的,要做实验确定楼层E,在楼层E扔下一个鸡蛋鸡蛋没碎,在E+1或者更高的楼层扔下一个鸡蛋,鸡蛋就会碎,假设一个鸡蛋没有碎,就会用到下一次实验,求最坏情况下的最少实验次数,就能确定E的; 题解:最坏情况下的最小值,表示有个鸡蛋,层楼的最坏情况下的最少实验次数,状态转移方程如下:具体解释:枚举楼层,如果实验鸡蛋碎了,那么就用...原创 2018-09-29 16:26:41 · 344 阅读 · 0 评论