# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
134636 | ckodser | Roller Coaster Railroad (IOI16_railroad) | C++14 | 135 ms | 15728 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 "railroad.h"
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define pii pair<ll,ll>
#define F first
#define S second
#define ld long double
using namespace :: std;
const ll maxn=1e5+500;
const ll inf=1e9+900;
long long plan_roller_coaster(vector<int> s,vector<int> t) {
int n = (int) s.size();
vector<pii> vec;
for(auto v:s){
vec.pb(mp(v,1));
}
for(auto v:t){
vec.pb(mp(v,0));
}
sort(vec.begin(),vec.end());
reverse(vec.begin(),vec.end());
ll sum=0;
for(auto e:vec){
if(e.S==0){
sum++;
}else{
sum--;
}
if(sum>1)return 1;
}
return 0;
}
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... |