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;
#define ll long long
#define pii pair<int,int>
#define fs first
#define sc second
#define pll pair<ll,ll>
#define _all(T) T.begin(),T.end()
//claim always can be connected
const ll inf = 1e18;
const int mxn = 2e5+10;
vector<int> all;
int deg[mxn*3];
long long plan_roller_coaster(std::vector<int> s, std::vector<int> t) {
int N = (int)s.size();
vector<int> v(N);iota(v.begin(),v.end(),0);
sort(v.begin(),v.end(),[&](int a,int b){return t[a]<s[b];});
for(int i = 1;i<N;i++){
int pre = v[i-1],now = v[i];
if(t[pre]>s[now])return 1;
}
return 0;
}
# | 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... |