Submission #1031691

#TimeUsernameProblemLanguageResultExecution timeMemory
1031691pccRoller Coaster Railroad (IOI16_railroad)C++17
0 / 100
43 ms10580 KiB
#include "railroad.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define pii pair<int,int> #define fs first #define sc second #define pll pair<ll,ll> #define _all(T) T.begin(),T.end() //claim always can be connected const ll inf = 1e18; const int mxn = 2e5+10; vector<int> all; int deg[mxn*3]; long long plan_roller_coaster(std::vector<int> s, std::vector<int> t) { int N = (int)s.size(); vector<int> v(N);iota(v.begin(),v.end(),0); sort(v.begin(),v.end(),[&](int a,int b){return t[a]<s[b];}); for(int i = 1;i<N;i++){ int pre = v[i-1],now = v[i]; if(t[pre]>s[now])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...