hihoCoder太阁最新面经算法竞赛16 register

Ended

Participants:75

Verdict:Accepted
Score:100 / 100
Submitted:2016-11-27 19:42:43

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
//Gavin http://www.cnblogs.com/IMGavin/
#include<cstdio>
#include<iostream>
#include<cstdlib>
#include<cstring>
#include<string>
#include<algorithm>
#include<map>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
using namespace std;
typedef long long LL;
#define Hash(x) (x - 'a')
const int N = 500008, CH = 26;
struct Trie{
    Trie *next[CH];
    Trie *fail;
    int len;
};
int flag[N];
char str[N];
class ACauto{
    Trie tree[N];
    private:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX