
动态规划dp
文章平均质量分 83
依旧Lily
发自己的光就好,别去吹灭别人的灯。
展开
-
Tickets(动态规划 dp)
Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go back home as early as possible.A good approach, reducing the total time of t原创 2021-05-28 20:10:38 · 164 阅读 · 0 评论 -
Super Jumping! Jumping! Jumping!(动态规划dp 非连续递增序列求和)
Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now.The game can be played by two or more than two players. It consists o原创 2021-05-25 19:23:59 · 119 阅读 · 0 评论 -
Halloween Costumes LightOJ - 1422(区间dp)
Gappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it’s Halloween, these parties are all costume parties, Gappu always selects his costumes in such a way that it bl.原创 2021-05-18 10:38:13 · 272 阅读 · 2 评论 -
Multiplication Puzzle(区间dp)
The multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the row and scores the number of points equal to the product of the number on the card taken and the numbers on原创 2021-05-18 08:03:08 · 577 阅读 · 2 评论 -
Maximum Sum of Products(区间dp)
You are given two integer arrays a and b of length n.You can reverse at most one subarray (continuous subsegment) of the array a.Your task is to reverse such a subarray that the sum ∑i=1nai⋅bi is maximized.InputThe first line contains one integer n (1≤原创 2021-05-17 20:31:36 · 281 阅读 · 0 评论