Submission #415128

#TimeUsernameProblemLanguageResultExecution timeMemory
415128schseMechanical Doll (IOI18_doll)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #ifndef EVAL #include "grader.cpp" #endif #include "meetings.h" long long calcscore(int l, int r, int p, std::vector<int> const &H) { int mx = 0; long long sum = 0; for (int i = p; i <= r; i++) { mx = max(mx, H[i]); sum += mx; } mx = 0; for (int i = p; i >= l; i--) { mx = max(mx, H[i]); sum += mx; } sum -= H[p]; return sum; } long long findmin(int l, int r, std::vector<int> const &H) { long long mx = INT64_MAX; for (int i = l; i <= r; i++) { mx = min(mx, calcscore(l, r, i, H)); } return mx; } std::vector<long long> minimum_costs(std::vector<int> H, std::vector<int> L, std::vector<int> R) { int Q = L.size(); std::vector<long long> C(Q); for (int j = 0; j < Q; ++j) { C[j] = findmin(L[j], R[j], H); } return C; }

Compilation message (stderr)

doll.cpp:6:10: fatal error: meetings.h: No such file or directory
    6 | #include "meetings.h"
      |          ^~~~~~~~~~~~
compilation terminated.