# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
439484 | qwerasdfzxcl | Fountain Parks (IOI21_parks) | C++17 | 1042 ms | 146924 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
struct point{
int x, y, n;
point(){}
point(int _x, int _y, int _n): x(_x), y(_y), n(_n) {}
bool operator<(const point &P) const{
if (x+y==P.x+P.y) return y<P.y;
return x+y<P.x+P.y;
}
};
struct DSU{
int path[200200];
void init(int n){
for (int i=0;i<n;i++) path[i] = i;
}
int find(int s){
if (s==path[s]) return s;
return path[s] = find(path[s]);
}
void merge(int s, int v){
int x = find(s), y = find(v);
if (x==y) return;
path[x] = y;
}
}dsu;
struct Vertex{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |