Gabriel Wu
Gabriel Wu
@Genius3435 I think your method is just the same because you need to check all points to find the 4 maximums. By the way, the comment system does not support...
@renyajie 可以看看【其他-小贴士】
> Hi I cannot understand why do we need a-1 and b+1 too in problem D. Actually what we do need is `a` and `b+1`. `a-1` and `b` are unnecessary....
300iq moved from Canada to Russia.
@Afrankie 也许可以转换思路,不是做某一个难度的题,而是按照题目的类型分专题来做。
@Afrankie CF的Div.2 Div.3都可以参加,其实CF跟Leetcode的风格不太一样,更多偏向思维题。想要AC Leetcode周赛,还是需要多刷一刷困难难度的题目,光做中等还不太够。
这周连跪两场,估计排名得掉到20开外了,心塞……
> 三方的那个,用静态数组+前缀和应该不会超时吧,我比赛时递推的没超。 所有数组都开成int[][]和int[]确实不会超,我最后也是这么过的。不过这题确实记忆化递归要大大优于递推。
@Afrankie 因为非c结尾的,只能来自上一次的非c;而c结尾的,可以来自上一次除了c之外的任何一种情况。所以这两个转移的处理是不同的。
@Afrankie 这样就错了啊,并不能任意地从`dp[k]`转移到`ndp[j]`,因为只有`j==c`时才能进行这种转移。