# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
610526 | alirezasamimi100 | Roller Coaster Railroad (IOI16_railroad) | C++17 | 278 ms | 25100 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "railroad.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using pll = pair<ll,ll>;
#define pb push_back
#define F first
#define S second
vector<ll> cp,ps,p;
vector<pll> vec;
int n;
ll ans;
ll gp(ll x){
return p[x]==-1?x:p[x]=gp(p[x]);
}
bool uni(ll v, ll u){
v=gp(v);
u=gp(u);
if(v==u) return false;
p[u]=v;
return true;
}
ll plan_roller_coaster(vector<int> s, vector<int> t) {
s.pb(1e9+10);
t.pb(1);
for(int i=0; i<(int)s.size(); i++){
# | 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... |