# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
172087 | arnold518 | Roller Coaster Railroad (IOI16_railroad) | C++14 | 96 ms | 10544 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;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 2e5;
struct Data
{
ll s, t;
};
int N;
Data A[MAXN+10];
ll plan_roller_coaster(vector<int> _S, vector<int> _T)
{
int i, j;
N=_S.size();
for(i=1; i<=N; i++) A[i]={_S[i-1], _T[i-1]};
sort(A+1, A+N+1, [&](const Data &p, const Data &q) { return p.t<q.t; });
for(i=1; i<N; i++) if(A[i].t>A[i+1].s) return 0;
return 1;
}
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... |