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 "bits/stdc++.h"
#include "railroad.h"
using namespace std;
long long j,l,d[200005],g[100];
vector<int>v;
long long plan_roller_coaster(vector<int> s, vector<int> t) {
int n = (int) s.size();
for(int i=0;i<n;i++){
v.push_back(s[i]);
}
sort(v.begin(),v.end());
for(int i=0;i<n-1;i++){
d[lower_bound(v.begin(),v.end(),t[i])-v.begin()]++;
}
for(int i=n;i>0;i--){
d[i]+=d[i+1];
if(d[i]>=n-i+2) return 0;
}
return 1;
}
# | 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... |