# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
994517 | SuPythony | Roller Coaster Railroad (IOI16_railroad) | C++17 | 55 ms | 9536 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 <bits/stdc++.h>
#include "railroad.h"
using namespace std;
typedef long long ll;
bool comp(pair<int,int> a, pair<int,int> b) {
if (a.first==b.first) return a.second<b.second;
return a.first>b.first;
}
ll plan_roller_coaster(vector<int> s, vector<int> t) {
vector<pair<int,int>> a;
for (int i=0; i<s.size(); i++) {
a.push_back({s[i],t[i]});
}
sort(a.begin(),a.end(),comp);
int curr=1;
for (auto i: a) {
if (curr>i.first) return 1;
curr=i.second;
}
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... |