摘要:
3 invalid situations case1: 2 parents no circle case2: 2 parents with circle case3: 1 parent with circle 2 main steps 1 check whether there exists a n 阅读全文
posted @ 2019-09-06 10:34
約束の空
阅读(163)
评论(0)
推荐(0)
摘要:
一看知道是dp题,但是和常规dp很不一样,如何formulate问题很难想。 dp[i][j] 表示最后长度L的list前 i 个中有 j 首unique的歌。dp[L][N] 就是我们的答案。 第一维i很好想。由于题目有要求其他k首歌放过以后才能重复播放歌曲,因此我们要记录其他歌曲的播放情况。因此 阅读全文
posted @ 2019-09-06 08:15
約束の空
阅读(158)
评论(0)
推荐(0)

浙公网安备 33010602011771号