제출 #276576

#제출 시각아이디문제언어결과실행 시간메모리
276576arayiRoller Coaster Railroad (IOI16_railroad)C++17
0 / 100
128 ms6520 KiB
#include "railroad.h" #include <bits/stdc++.h> #define lli long long int #define fr first #define sc second #define all(x) (x).begin(), (x).end() using namespace std; const int N = 2e5 + 30; int n, sm[N]; pair <int, int> a[N]; long long plan_roller_coaster(vector<int> s, vector<int> t) { n = s.size(); for (int i = 0; i < n; i++) { a[i].fr = s[i]; if(s[i] >= t[i]) sm[i]++; a[i].sc = -sm[i]; } sort(a, a + n); sort(all(t)); for (int i = 0; i < n; i++) { int i1 = upper_bound(all(t), a[i].fr) - t.begin(); i1 += a[i].sc; if(i1 < 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...