[Offer收割]编程练习赛23 register

Ended

Participants:430

Verdict:Time Limit Exceeded
Score:80 / 100
Submitted:2017-08-20 14:02:14

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 <bits/stdc++.h>
using namespace std;
const int N = 100005;
const int M = 2 * N;
const int INF = 0x3f3f3f3f;
struct Edge
{
    int u, v, w, id;
    bool operator < (const Edge& rhs) const
    {
        return w < rhs.w;
    }
    void scan(int _id)
    {
        id = _id;
        scanf("%d%d%d", &u, &v, &w);
    }
} e[M];
struct Ans
{
    int x, y;
    Ans() : x(0), y(0) {}
} ans[M];
int fa[N], mx[N];
int n, m;
int Find(int x)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX