
尺取法
zzuli-dk
这个作者很懒,什么都没留下…
展开
-
poj 3320
#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long LL; const int inf = 0x3f3f3f3f; const int N = 100原创 2016-10-23 14:49:14 · 289 阅读 · 0 评论 -
hdu 6103 Kirinriki dp+二分 或 尺取法
题目连接:hdu 6103 题意:找出整个字符串中两个相同长度,但不重叠的连续字串,求满足他们的距离小于等于m的最长长度。 二分+dp应该也是能写的,但是我错了,应该是dp没写好, 队友写的dp过了。#include<bits/stdc++.h> using namespace std; const int MAXN = 5005; char str[20005]; short int dp[M原创 2017-08-12 08:58:59 · 217 阅读 · 0 评论