# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
135842 | Runtime_error_ | Roller Coaster Railroad (IOI16_railroad) | C++14 | 280 ms | 16820 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "railroad.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int inf = 2e5+9 , MX = 1e18+9;
bool operator <(pair<int,int> x,pair<int,int> y){
if(x.first == y.first)
return x.second<y.second;
return x.first<y.first;
}
int n;
multiset<pair<int,int> > s;
long long plan_roller_coaster(vector<int> S, vector<int> T) {
n = (int) S.size();
for(int i=0;i<n;i++)
s.insert(make_pair(S[i],T[i]));
int curt = 1;
while(!s.empty()){
multiset<pair<int,int> > ::iterator it = s.lower_bound(make_pair(curt,-1));
if(it == s.end())
return 1;
curt = it->second;
s.erase(it);
}
return 0;
}
컴파일 시 표준 에러 (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... |