hiho week 282 register

Ended

Participants:51

Verdict:Accepted
Score:100 / 100
Submitted:2019-11-24 19:33:38

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 <map>
#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
int gint(){
    char c; int f=1;
    while(c=getchar(),c<48||c>57)
        if(c=='-')f=-1;
    int x=0;
    for(;c>47&&c<58;c=getchar()){
        x=x*10+c-48;
    }
    return x*f;
}
#define max_N 100005
#define Mod 1000000007
int eu[max_N],ev[max_N];
struct edge{
    int v,n;
    edge(int v=0,int n=0):v(v),n(n){}
}e[max_N<<1];
int head[max_N],tot,d[max_N];
void add_edge(int u,int v){
    e[++tot]=edge(v,head[u]),head[u]=tot;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX