Submission #1069612

#TimeUsernameProblemLanguageResultExecution timeMemory
1069612IgnutRoller Coaster Railroad (IOI16_railroad)C++17
0 / 100
103 ms16724 KiB
// Ignut #include <bits/stdc++.h> using namespace std; using ll = long long; const ll INF = 1e18 + 123; ll plan_roller_coaster(vector<int> s, vector<int> t) { int n = s.size(); multiset<pair<int, int>> ms; for (int i = 0; i < n; i ++) ms.insert({s[i], t[i]}); int speed = 1; for (int i = 0; i < n; i ++) { auto it = ms.lower_bound({speed, -1}); if (it == ms.end()) return 1; auto [S, T] = *it; ms.erase(it); speed = S; } return 0ll; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...