DP
文章平均质量分 53
turtlew
这个作者很懒,什么都没留下…
展开
-
bitset优化背包...
题目: https://s3.amazonaws.com/codechef_shared/download/translated/SNCKEL16/mandarin/RWALK.pdf 这题可以转化成背包。 L,R什么的可以无视,因为替换他们不用时间。 将竖直方向和左右方向分成两个数组。 分别求出他们的和sum1,sum2。将其转化成背包,看成sum1的背包最多可以选多少个(长度和*2),原创 2016-07-19 15:24:57 · 2248 阅读 · 0 评论 -
hourrank 11 LCS Returns
Given two strings, and , find and print the total number of ways to insert a character at any position in string such that the length of the Longest Common Subsequence of characters in the two strings原创 2016-08-03 19:35:15 · 193 阅读 · 0 评论 -
日常补
D 维空间里有一个关于点的集合 S,集合中的点的第 i 维坐标 ai 满足 1≤ai≤di ,其中 di 是给定的正整数 ,所以 S 中总共有 ∏di 个点。定义一次空间旅行是指,从 (1,1,⋯,1) 开始进行移动,每次移动只能将某一维坐标加 1 、其他维坐标不变,从而走到下一个点,然后继续进行移动,每次移动前也可以选择结束此次旅行。问至少进行多少次空间旅行,才能将 S 中所有的点都访问至少一次原创 2016-12-12 14:41:00 · 265 阅读 · 0 评论