Submission #1022513

#TimeUsernameProblemLanguageResultExecution timeMemory
1022513RaresFelixRoller Coaster Railroad (IOI16_railroad)C++17
Compilation error
0 ms0 KiB
#include "shortcut.h" #include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vll = vector<ll>; const ll INF = 1e18; ll find_shortcut(int n, vi l, vi d, int c) { vll s(n, 0), alpha(n, 0), beta(n, 0); for(int i = 1; i < n; ++i) { s[i] = s[i - 1] + l[i - 1]; } ll re = INF; auto dist = [&](int i, int j, int a, int b) { if(i > j) swap(i, j); return d[i] + d[j] + min(abs(s[i] - s[j]), abs(s[i] - s[a]) + c + abs(s[j] - s[b])); }; for(int a = 0; a < n; ++a) for(int b = a; b < n; ++b) { ll cre = 0; for(int i = 0; i < n; ++i) for(int j = i; j < n; ++j) cre = max(cre, dist(i, j, a, b)); re = min(re, cre); } return re; }

Compilation message (stderr)

railroad.cpp:1:10: fatal error: shortcut.h: No such file or directory
    1 | #include "shortcut.h"
      |          ^~~~~~~~~~~~
compilation terminated.