hiho week 149 register

Ended

Participants:261

Verdict:Accepted
Score:100 / 100
Submitted:2017-05-13 18:09:53

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
/* ***********************************************
Author        :Kylin_lhy
Created Time  :20170513  151535
File Name     :403fob.cpp
************************************************ */
#include <bits/stdc++.h>
using namespace std;
#define m0(x) memset(x,0,sizeof(x))
#define mff(x) memset(x,0xff,sizeof(x))
#define fi first
#define se second
typedef long long ll;
const ll mod=1e9+7;
const ll maxn=1e5+7;
const ll maxe=1e6+7;
const ll INF=1e9+7;
const double eps=1e-8;
int dx[4]={0,0,1,-1};
int dy[4]={-1,1,0,0};
int T;
const int max_word = 1e6+7;  
const int sigma_size = 2;  
const int max_text = 1000; 
struct Trie{  
    int next[max_word][sigma_size], end[max_word];  
    int root, L;  
    int newnode(){  
        for(int i = 0; i < sigma_size; i++) next[L][i] = -1;  
        end[L++] = INF;  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX