2014年7月17日

POJ 1159 Palindrome

摘要: 好吧,在几天一直做水题,找找手感,过两天开刷难题。#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 ~Love() 阅读(98) 评论(0) 推荐(0)

POJ 1050 To the Max

摘要: 转换为一维数组求最大连续子段和,然后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 ~Love() 阅读(99) 评论(0) 推荐(0)

UVA 1351 - String Compression

摘要: 题意: 对于一个字符串中的重复部分可以进行缩写,例如”gogogo“可以写成“3(go)”,从6个字符变成5个字符。。"nowletsgogogoletsgogogoandrunrunruncould " 可以写成 "now2(lets3(go))and3(run)".现在问在这个规则下,问给定一个... 阅读全文

posted @ 2014-07-17 18:43 ~Love() 阅读(164) 评论(0) 推荐(0)

导航