Submission #309200

#TimeUsernameProblemLanguageResultExecution timeMemory
309200cgiosyRoller Coaster Railroad (IOI16_railroad)C++17
0 / 100
108 ms8056 KiB
#include "railroad.h" #include <bits/stdc++.h> using namespace std; using ll=long long; ll plan_roller_coaster(vector<int> S, vector<int> E) { const int N=S.size(); vector<int> X(N); iota(X.begin(), X.end(), 0); sort(X.begin(), X.end(), [&](int i, int j) { return S[i]<S[j]; }); int p=X[0]; for(int i:X) { if(i!=p && S[p]<E[i] && E[p]>S[i]) return 1; p=i; } 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...