题目链接:https://vjudge.net/problem/POJ-3581 Sequence Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 7754 Accepted: 1761 Case Time Limit: 2000MS Description Given a sequence, {A1, A2, ..., An} which is guaranteed A1 > A2, ..., An, you ar…
Sequence Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 6893 Accepted: 1534 Case Time Limit: 2000MS Description Given a sequence, {A1, A2, ..., An} which is guaranteed A1 > A2, ..., An, you are to cut it into three sub-sequences and…
Description Given a sequence, {A1, A2, ..., An} which is guaranteed A1 > A2, ..., An, you are to cut it into three sub-sequences and reverse them separately to form a new one which is the smallest possible sequence in alphabet order. The alphabet or…
后缀数组之前一直在给队友搞,但是这个类太大了,预感到青岛八成会有,于是自己也学习一下,记录一下做题的历程 所用的模板暂时来自于队友的倍增nlogn da算法 int t1[maxn] , t2[maxn] , c[maxn] ; bool cmp(int *r , int a , int b , int l) { return r[a] == r[b] && r[a+l] == r[b+l] ; } void da(int s[], int sa[], int ra[], int he[]…