摘要: 终于学会倍增法了, 先一个最水最水的后缀数组应用。#include #include #include using namespace std;const int maxn = 1e6;char buf[maxn];int str[maxn], len, sa[maxn];inline int id... 阅读全文
posted @ 2014-09-19 16:39 acm_roll 阅读(365) 评论(0) 推荐(0) 编辑
摘要: = = 现在才会写,感觉有点怂就是一位一位的比较,对于每一位,使用计数排序,然后排序就好了,而且显然这是一种稳定排序算法。#include #include using namespace std;const int maxn = 1005;int num[maxn], n, bid[maxn], ... 阅读全文
posted @ 2014-09-19 14:41 acm_roll 阅读(230) 评论(0) 推荐(0) 编辑