# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1021351 | Issa | Roller Coaster Railroad (IOI16_railroad) | C++17 | 140 ms | 13100 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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int inf = 1e9 + 100;
const ll INF = 1e18 + 100;
const int maxn = 4e5 + 100;
int n;
ll dp[1<<16][16];
int a[maxn];
int b[maxn];
vector<int> s;
int pref[maxn];
int p[maxn];
int get(int v){
if(p[v] == v) return v;
return p[v] = get(p[v]);
}
void join(int a, int b){
p[get(a)] = get(b);
}
long long plan_roller_coaster(std::vector<int> s, std::vector<int> t){
n = s.size();
for(int i = 0; i < n; i++){
a[i] = s[i];
Compilation message (stderr)
# | 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... |