Submission #827582

#TimeUsernameProblemLanguageResultExecution timeMemory
827582caganyanmazRoller Coaster Railroad (IOI16_railroad)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define mp(x...) array<int, 2>({x}) #define pb push_back #define DEBUGGING #define int int64_t #include "railroad.h" using namespace std; #ifdef DEBUGGING #include "../debug.h" #else #define debug(x...) void(42) #endif long long plan_roller_coaster(vector<int32_t> s, vector<int32_t> t) { int n = s.size(); vector<array<int, 2>> vals; for (int i = 0; i < n; i++) { vals.pb({s[i], +1}); vals.pb({t[i], -1}); } sort(vals.begin(), vals.end()); int pf = vals[0][1] - 1; int res = 0; for (int i = 1; i < vals.size(); i++) { if (pf > 0) res += max<int>(pf, 1) * (vals[i][0] - vals[i-1][0]); debug(pf, vals[i-1][0], vals[i][0], res); pf += vals[i][1]; } return res; }

Compilation message (stderr)

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