hiho Week 11 register

Ended

Participants:433

Verdict:Accepted
Score:100 / 100
Submitted:2014-09-19 04:23:41

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<stdio.h>
#include<iostream>
#include<algorithm>
#include<string.h>
using namespace std;
const int MAXN = 100010;
struct Node
{
    int to;
    int next;
}edge[MAXN * 2];
int head[MAXN];//
int tol;
int maxn[MAXN];//
int smaxn[MAXN];//
int maxid[MAXN];//
int smaxid[MAXN];//
void init()
{
    tol = 0;
    memset(head, -1, sizeof(head));
}
void add(int a, int b)
{
    edge[tol].to = b;
    edge[tol].next = head[a];
    head[a] = tol++;
    edge[tol].to = a;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX