hiho week 218 register

Ended

Participants:159

Verdict:Accepted
Score:100 / 100
Submitted:2018-09-08 16:10:40

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
//218 kmp
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <cmath>
#include <cstdio>
#include <vector>
#include <string>
#include <cstring>
#include <fstream>
#include <iostream>
#include <algorithm>
using namespace std;
#define eps 1e-8
#define PI acos(-1.0)
#define INF 0x3f3f3f3f
#define FAST_IO ios::sync_with_stdio(false)
const int N=100000+10;
typedef long long LL;
int Next[N],len1;
char s[N];
int vis[N];
void Get_Next(char *p,int len){
    int i=0,j=Next[0]=-1;
    while(i<len){
        while(j!=-1&&p[i]!=p[j]) j=Next[j];
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX