2014年7月17日
摘要: 好吧,在几天一直做水题,找找手感,过两天开刷难题。#include#include#include#include#includeusing namespace std;const int MAXN = 5010;short int dp[2][MAXN];int main(){ int n;... 阅读全文
posted @ 2014-07-17 23:50 wangzhili 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 转换为一维数组求最大连续子段和,然后dp水。#include#include#include#include#includeusing namespace std;const int MAXN = 111;int dp[MAXN], mat[MAXN][MAXN];int subMax(int n,... 阅读全文
posted @ 2014-07-17 23:39 wangzhili 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 题意: 对于一个字符串中的重复部分可以进行缩写,例如”gogogo“可以写成“3(go)”,从6个字符变成5个字符。。"nowletsgogogoletsgogogoandrunrunruncould " 可以写成 "now2(lets3(go))and3(run)".现在问在这个规则下,问给定一个... 阅读全文
posted @ 2014-07-17 18:43 wangzhili 阅读(141) 评论(0) 推荐(0) 编辑