제출 #962955

#제출 시각아이디문제언어결과실행 시간메모리
962955amine_arouaRoller Coaster Railroad (IOI16_railroad)C++17
0 / 100
48 ms8784 KiB
#include <bits/stdc++.h> using namespace std; #define fore(i , n) for(int i = 0 ; i<n;i++) #define forr(i , x , y) for(int i = x; i<=y;i++) #define forn(i , x , y) for(int i = x ; i>=y;i--) #define vi vector<int> #define vii vector<pair<int ,int>> #define pb push_back #define lint long long #define sz(s) (int)s.size() #define all(v) v.begin() , v.end() #define nl '\n' lint plan_roller_coaster(vi s , vi t) { int n = sz(s); vii v(n); fore(i , n) { v[i] = {s[i] , t[i]}; } sort(all(v)); int acc = 1; fore(i , n - 1) { if(!(s[i] <= t[i] && t[i] <= s[i + 1])) { acc = 0; break; } } if((s[n - 1] > t[n - 1])) acc = 0; return 1 - acc; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...