# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1030955 | Warinchai | Roller Coaster Railroad (IOI16_railroad) | C++14 | 2033 ms | 8528 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>
using namespace std;
long long plan_roller_coaster(std::vector<int> s, std::vector<int> t) {
int n = (int) s.size();
vector<pair<int,int>>v;
for(int i=0;i<n;i++){
v.push_back({s[i],1});
v.push_back({t[i],-1});
}
sort(v.begin(),v.end());
int val=0;
for(int i=0;i<v.size();){
int sp=v[i].first;
while(i<n&&v[i].first==sp){
val+=v[i].second;
i++;
}
if(val>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... |