hiho week 52 register

Ended

Participants:214

Verdict:Accepted
Score:100 / 100
Submitted:2015-06-29 14:57:11

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 <cstring>
#include <algorithm>
#include <cmath>
#include <vector>
#include <queue>
#include <map>
#include <set>
using namespace std;
typedef long long ll;
#define N 20005
#define M 200005
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
int n,m,vis[N],parent[N],head[N],ne,low[N],cnt;
struct Edge{
    int v,next;
}e[M];
void add_edge(int u,int v){
    e[ne].v=v,e[ne].next=head[u],head[u]=ne++;
}
struct EdgeAns{
    int u,v;
    EdgeAns(){}
    EdgeAns(int u,int v):u(u),v(v){}
    bool operator < (const EdgeAns &a)const{
        if(u == a.u) return v < a.v;
        return u < a.u;
    }
    bool operator == (const EdgeAns &a)const{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX