![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dp
pioneer 1
如你所说,成为传奇。
展开
-
E. Pac Man for your New Phone
传送门 1000ms 262144K You are writing an app for your friend’s new Phone, the newPhone. Since you grew up on Pac Man, you want to write a simplified version of the game. In this game, the board is a rectangular grid and Pac Man starts at the upper left-ha..原创 2020-07-19 21:14:17 · 1335 阅读 · 0 评论 -
Wave
题意:波浪数组满足四个条件:1、至少两个元素。2、奇数位的数都相等。3、偶数位的数都相等。4、奇数位和偶数位的数不相等。给你一个数组(数组中元素不大于c),你要从中找出波浪数组的最大长度。(保证波浪数组是该数组的一部分就行,就是可以在数组中任意按顺序挑选,使之满足波浪数组的条件) 这个题可以用动态规划(dp)来解。首先了解一下什么是dp。 将一个复杂的问题分解成若干个子问题,通过综合子问题的最...原创 2019-11-15 20:43:39 · 311 阅读 · 0 评论