hiho week 78 register

Ended

Participants:288

Verdict:Accepted
Score:100 / 100
Submitted:2015-12-26 23:19:25

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 <algorithm>
#include <vector>
#include <string>
#include <queue>
using namespace std;
const int N = 2000000;
char node[N + 1];
int counts[N + 1];
int nextNode[N + 1];
int to[N];
int e = 0;
queue<int> q;
int main(){
    //freopen("input.txt", "r", stdin);
    memset(node, 0, sizeof node);
    memset(counts, 0, sizeof counts);
    memset(nextNode, 0, sizeof nextNode);
    memset(to, 0, sizeof to);
    int n;
    scanf("%d", &n);
    getchar();
    //string s;
    while (n--)
    {
        char c;
        int b = 0;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX