# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1042948 | ReLice | Roller Coaster Railroad (IOI16_railroad) | C++17 | 786 ms | 119216 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 "railroad.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define vll vector<ll>
#define fr first
#define bc back()
#define sc second
const ll inf=2e9;
const ll N=4e5+7;
vector<vector<int>> g(N);
int p[N],siz[N];
int anc(ll a){
return (a==p[a] ? a : p[a]=anc(p[a]));
}
bool uni(ll a,ll b){
a=anc(a),b=anc(b);
if(a==b)return false;
if(siz[a]>siz[b])swap(a,b);
siz[b]+=siz[a];
p[a]=b;
return true;
}
long long plan_roller_coaster(vector<int> s, vector<int> t) {
ll i;
ll n=s.size();
//compress;
set<int> st;
# | 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... |