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

Ended

Participants:128

Verdict:Accepted
Score:100 / 100
Submitted:2016-12-20 15:28: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
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<cstdio>
#include<cstring> // strlen
#include<cmath>
#include<set>
#include<queue>
#include<map>
#include<string>
#include<limits.h> // INT_MAX
#include<functional>
#include<algorithm>
#include<stack>
using namespace std;
const int maxn = 1e6+3;
const int maxm = 1e4+3;
typedef long long LL;
string ss[maxm];
vector<int> ma[26];
int mat[maxm];
char s[maxn];
int main(){ 
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    int n; scanf("%d",&n);
    for( int i(0); i < n; i++ ){
        scanf("%s",s);
        ss[i] = s;
        ma[s[0]-'a'].push_back(i);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX