博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年7月14日

摘要: 题目:http://poj.org/problem?id=2493View Code #include <iostream>#include <sstream>#include <cstdio>#include <map>#include <algorithm>using namespace std;const int N = 10000+10;char str[N];int main(){ //freopen("D:/a.txt", "r", stdin); int T, n, m, cas= 阅读全文

posted @ 2012-07-14 19:02 紫华弦筝 阅读(144) 评论(0) 推荐(0) 编辑

摘要: 题目:http://poj.org/problem?id=3261第一道后缀数组。二分答案,然后遍历height数组,判断该答案是否出现次数大于k次。View Code #include <cstdio>#include <cstring>#include <map>using namespace std;const int N = 1000000+10;int ua[N], ub[N], us[N], n, m, arr[N], sa[N], t, cnt;int cmp(int *r,int a,int b,int l){ return r[a]==r[ 阅读全文

posted @ 2012-07-14 14:52 紫华弦筝 阅读(102) 评论(0) 推荐(0) 编辑