# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1042843 | Zicrus | Roller Coaster Railroad (IOI16_railroad) | C++17 | 2017 ms | 5576 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;
ll plan_roller_coaster(vector<int> s, vector<int> t) {
ll n = s.size();
vector<pair<ll, ll>> m;
for (int i = 0; i < 100000; i++) {
m.push_back({(ll)s[i], (ll)t[i]});
}
std::sort(m.begin(), m.end());
ll cur = (*m.begin()).second;
m.erase(m.begin());
ll res = 0;
while (!m.empty()) {
auto iter = lower_bound(m.begin(), m.end(), pair<ll, ll>(cur, 0));
if (iter == m.end()) return 1;
cur = (*iter).second;
m.erase(iter);
}
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... |