随笔分类 -  dp

摘要:Description Description 8102年,Normalgod在GLaDOS的帮助下,研制出了传送枪。但GLaDOS想把传送枪据为己有,于是把Normalgod扔进了一间实验室。这间实验室是一棵有n个节点的树。现在Normalgod在一号节点,出口也在一号节点,但为了打开它,必须经过 阅读全文
posted @ 2018-10-16 21:58 kasiruto 阅读(293) 评论(0) 推荐(0)
摘要:Description Description 题目背景:尊者神高达进入了基三的世界,作为一个 mmorpg 做任务是必不可少的,然而跑地图却令人十分不爽。好在基三可以使用轻功,但是尊者神高达有些手残,他决定用梅花桩练习轻功。题目描述:一共有 n 个木桩,要求从起点(0)开始,经过所有梅花桩,恰好到 阅读全文
posted @ 2018-10-16 21:17 kasiruto 阅读(165) 评论(0) 推荐(0)
摘要:Description Description Input Output Sample Input 5 3 1 6 1 5 3 5 4 4 4 4 Sample Output 15 Data Constraint Hint Summary 设f[i][j]表示前i个,用了j个矩阵的最大答案。 f[i 阅读全文
posted @ 2018-09-12 16:35 kasiruto 阅读(184) 评论(0) 推荐(0)
摘要:Description Description Input Output Sample Input 7 9 39 6 13 2 22 6 7 4 -19 5 28 6 -17 1 2 1 3 2 4 1 5 4 6 2 7 3 Sample Output 52 Data Constraint Sum 阅读全文
posted @ 2018-09-12 16:28 kasiruto 阅读(149) 评论(0) 推荐(0)
摘要:Description Description GZOI队员们到X镇游玩。X镇是一个很特别的城镇,它有m+1条东西方向和n+1条南北方向的道路,划分成m*n个区域,这些区域标从北到南、从西到东的坐标标识为从坐标 (1,1) 到坐标(m,n)。 GZOI队员们预先对这m*n个区域打分V(i,j)(分数 阅读全文
posted @ 2018-08-25 09:06 kasiruto 阅读(166) 评论(0) 推荐(0)
摘要:Description Description Input Output 输出 q行,第 i行输出对于第 i个询问的答案。 Sample Input 5 2 3 4 1 2 1 4 1 2 2 1 1 3 2 3 5 1 10 2 7 3 4 4 8 0 5 Sample Output 13 11 阅读全文
posted @ 2018-08-25 08:53 kasiruto 阅读(201) 评论(0) 推荐(0)
摘要:Description Description Input Output Sample Input 7 3 Sample Output 4 Data Constraint Hint Soution 类似第二类𝑠𝑡𝑖𝑟𝑙𝑖𝑛𝑔数的,我们将方案分成两种:1.至少包含一个 1 的;2.一个 阅读全文
posted @ 2018-08-25 08:41 kasiruto 阅读(229) 评论(0) 推荐(0)
摘要:Description 打开了黑魔法师Vani的大门,队员们在迷宫般的路上漫无目的地搜寻着关押applepi的监狱的所在地。突然,眼前一道亮光闪过。“我,Nizem,是黑魔法圣殿的守卫者。如果你能通过我的挑战,那么你可以带走黑魔法圣殿的地图……”瞬间,队员们被传送到了一个擂台上,最初身边有一个容量为 阅读全文
posted @ 2018-07-16 09:52 kasiruto 阅读(230) 评论(0) 推荐(0)