제출 #889164

#제출 시각아이디문제언어결과실행 시간메모리
889164Ghulam_JunaidRoller Coaster Railroad (IOI16_railroad)C++17
0 / 100
164 ms22324 KiB
#include <bits/stdc++.h> // #include "grader.cpp" using namespace std; typedef long long ll; ll plan_roller_coaster (vector<int> s, vector<int> t){ ll n = s.size(); set<vector<int>> st; for (int i=0; i<n; i++) st.insert({t[i], s[i], i}); vector<int> last = {-1, -1, -1}; ll can = 1; while (st.size()){ auto lb = st.lower_bound(last); if (lb == st.end()){ can = 0; break; } last = *lb; last[1] = last[0]; last[0] = -1; last[2] = -1; st.erase(lb); } return can; } // int main(){ // 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...