제출 #799668

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
7996682023-07-31 18:33:27kirakaminski968Roller Coaster Railroad (IOI16_railroad)C++17
100 / 100
179 ms22764 KiB
#include "railroad.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
struct dsu{
int par[400005];
void init(int N){
for(int i = 0;i<=N;++i) par[i] = i;
}
int finden(int x){
return par[x] = (par[x] == x ? x : finden(par[x]));
}
bool unite(int x, int y){
x = finden(x); y = finden(y);
if(x == y){
return false;
}
par[y] = x;
return true;
}
}D;
struct edge{
int start, ende, wert;
bool operator<(const edge &e)const{
return wert < e.wert;
}
};
int cnt[400005];
ll plan_roller_coaster(vector<int> s, vector<int> t){
vector<int> merged; int n = (int)s.size();
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...