hiho week 47 register

Ended

Participants:466

Verdict:Accepted
Score:100 / 100
Submitted:2015-05-24 10:20:50

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<iostream>
#include<stdio.h>
#include<queue>
using namespace std;
const int MAXN = 100000;
const int MAXM = 500000;
int T;
int N, M;
int inDeg[MAXN + 1];
int head[MAXN + 1];
int p[MAXM + 1];
int nextEdge[MAXM + 1];
int edgeCnt;
int a, b;
const char * YES = "Correct";
const char * NO  = "Wrong";
void init(){
    edgeCnt = 0;
    for(int i = 1; i <= N; i++){
        head[i] = inDeg[i] = 0;
    }
    for(int i = 1; i <= M; i++){
        nextEdge[i] = 0;
    }
}
void addEdge(int u, int v){
    edgeCnt++;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX