Submission #784906

#TimeUsernameProblemLanguageResultExecution timeMemory
784906GusterGoose27Roller Coaster Railroad (IOI16_railroad)C++17
0 / 100
63 ms8020 KiB
#include "railroad.h" #include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; typedef long long ll; const int MAXN = 2e5+5; const int MAXM = 1e9+5; int nxt[MAXN]; int n; ll plan_roller_coaster(vector<int> s, vector<int> t) { // vector<pii> left, right; n = s.size(); // right.push_back(pii(1, 0)); // left.push_back(pii(MAXM, n+1)); // for (int i = 0; i < n; i++) { // left.push_back(pii(s[i], i+1)); // right.push_back(pii(t[i], i+1)); // } // sort(left.begin(), left.end()); // sort(right.begin(), right.end()); s.push_back(MAXM); t.push_back(1); sort(s.begin(), s.end()); sort(t.begin(), t.end()); for (int i = 0; i < n+1; i++) { if (t[i] > s[i]) return 1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...