# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1188172 | anmattroi | Roller Coaster Railroad (IOI16_railroad) | C++17 | 43 ms | 5560 KiB |
#include "railroad.h"
#include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
using ii = pair<int, int>;
template <class T> inline constexpr void cmin(T &x, const T &y) {if (x > y) x = y;}
long long plan_roller_coaster(vector<int> s, vector<int> t) {
int n = s.size();
vector<ii> a;
for (int i = 0; i < n; i++) a.emplace_back(s[i], t[i]);
sort(a.begin(), a.end(), [&](const ii &x, const ii &y) {
if (x.se != y.se) return x.se < y.se;
return x.fi > y.fi;
});
for (int i = 1; i < n; i++)
if (t[i-1] > s[i]) return 1;
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |