hiho week 128 register

Ended

Participants:146

Verdict:Accepted
Score:100 / 100
Submitted:2016-12-11 21:15:47

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<iostream>
#include<cstdio>
#include<cstring>
//#include<vector>
#include<algorithm>
#ifdef L_JUDGE
#pragma warning(disable:4996)
#endif
using namespace std;
const int MAXN=1e6+5;
const int MAXS=26;
#define MEM(x,a) memset(x,a,sizeof(x))
int maxlen[2*MAXN],minlen[2*MAXN],trans[2*MAXN][MAXS],slink[2*MAXN];
int n;
char str[MAXN];
void Init(){
    n=1;
    MEM(trans,-1);
    MEM(slink,-1);
    maxlen[0]=minlen[0]=0;
}
int NewState(int _maxlen,int _minlen,int *_trans,int _slink){
    maxlen[n]=_maxlen;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX