hiho week 245 register

Ended

Participants:153

Verdict:Accepted
Score:100 / 100
Submitted:2019-03-10 15:04:12

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 <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <iomanip>
#include <iostream>
using namespace std;
int par[1000005];
#define pos(x, y) (x)*1000 + y
int getPar(int s) {
    if (par[s] == s || par[s] > 10000000) {
        return s;
    }
    return s = getPar(par[s]);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX