摘要: 先放下代码:时间2018-4-9-19-58 #include#include#include#include#include#include#include#define N 2010000#define INF 0x3f3f3f3f#define MOD 1000... 阅读全文
posted @ 2018-04-09 19:59 _年少有为 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 代码先补出来 #include#include#include#include#include#include#include#define INF 0x3f3f3f3f3f#define N 1100#define MOD 10007using namespace... 阅读全文
posted @ 2018-04-08 17:27 _年少有为 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 题目链接It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring p... 阅读全文
posted @ 2018-04-02 20:09 _年少有为 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 大概写一下 有时间再完善1.用vir[][][]数组记录此次选择的上一个选择位置2.数组cc[][]记录此次选择的最长公共子序列的最后一位的在a字符串的下标 cc[i][j]=0表示从上个位置到此次位置没有更新更好的回溯 数组cc里面存的就是最长公共子序列/*最长... 阅读全文
posted @ 2018-03-28 13:35 _年少有为 阅读(397) 评论(0) 推荐(0) 编辑
摘要: 对于上面的动态规划以第2个问题为例:最长递增子序列:dp[i]状态:以i为自增序列结尾的最大长度为dp[i];决策:从第i个往前找,找到a[j]#include#include#include#include#include#include#define INF 0x... 阅读全文
posted @ 2018-03-20 18:31 _年少有为 阅读(774) 评论(0) 推荐(0) 编辑
摘要: The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often beca... 阅读全文
posted @ 2018-03-16 08:57 _年少有为 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。 某天,食堂中有n种菜出售,每种菜可购买... 阅读全文
posted @ 2018-03-09 20:56 _年少有为 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目:The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term... 阅读全文
posted @ 2018-01-31 17:58 _年少有为 阅读(182) 评论(0) 推荐(0) 编辑
摘要: The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian gove... 阅读全文
posted @ 2018-01-31 15:01 _年少有为 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Sunny Cup 2003 - Preliminary RoundApril 20th, 12:00 - 17:00 Problem E: QS NetworkIn the planet w-503 of galaxy cgb, there is a kind of... 阅读全文
posted @ 2018-01-30 17:54 _年少有为 阅读(210) 评论(0) 推荐(0) 编辑