# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
436531 | dacin21 | Fountain Parks (IOI21_parks) | C++17 | 1136 ms | 94092 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;
const int U = 1.01e5;
struct Segment{
int x, y;
bool vert;
};
struct Range{
int a, b;
};
struct Dsu{
Dsu(int n_) : p(n_, -1){}
int f(int x){
return p[x] < 0 ? x : p[x] = f(p[x]);
}
bool u(int a, int b){
a = f(a);
b = f(b);
if(a == b) return false;
p[b] = a;
return true;
}
vector<int> p;
};
// 2-sat in linear time via backtracking.
# | 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... |