# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
429138 | Antekb | Roller Coaster Railroad (IOI16_railroad) | C++14 | 849 ms | 57504 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "railroad.h"
#include<bits/stdc++.h>
#define st first
#define nd second
using namespace std;
typedef long long ll;
const int N=4e5+5;
vector<int> E[N];
int r[N];
int find(int v){
if(r[v]==v)return v;
return r[v]=find(r[v]);
}
void Union(int u, int v){
r[u]=v;
}
long long plan_roller_coaster(std::vector<int> s, std::vector<int> t) {
iota(r, r+N, 0);
int n = (int) s.size();
n++;
s.push_back(2e9);
t.push_back(1);
vector<pair<int, int> > V;
unordered_map<int, int> M;
int wsk=0;
for(int i=0; i<n; i++){
if(M.find(t[i])==M.end())M[t[i]]=wsk++;
if(M.find(s[i])==M.end())M[s[i]]=wsk++;
V.push_back({s[i], -1});
V.push_back({t[i], 1});
컴파일 시 표준 에러 (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... |