hiho Week 15 register

Ended

Participants:1653

Verdict:Accepted
Score:100 / 100
Submitted:2014-10-15 11:42:34

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<cstdio>
#include<cstring>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
using namespace std ;
const int MAXN = 100010 ;
map<string,int>map1 ;
vector<int>g[MAXN] ;
vector<int>query[MAXN] ;
string q1[MAXN],q2[MAXN] ;
string re[MAXN] ;
string ans[MAXN] ;
int fa[MAXN];
int cnt = 0 ;
int ini(string &a)
{
    if ( map1[a] == 0 )
    {
        map1[a]=++cnt ;
        re[cnt]=a ;
    }
    return map1[a] ;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX