| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1307708 | Leyna | Roller Coaster Railroad (IOI16_railroad) | C++20 | 2095 ms | 7724 KiB |
#include "railroad.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
long long plan_roller_coaster(std::vector<int> s, std::vector<int> t) {
int n = s.size();
ll res = 1e17;
vector<pair<ll, ll>> elements;
for (int i=0; i<n; i++) elements.push_back({s[i], t[i]});
sort(elements.begin(), elements.end());
do{
ll speed = 1;
ll part_res = 0;
for (auto[start, end] : elements){
part_res += max((ll)0, speed-start);
speed = end;
}
res = min(res, part_res);
} while(next_permutation(elements.begin(), elements.end()));
return res;
}
컴파일 시 표준 에러 (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... | ||||
