Submission #120042

#TimeUsernameProblemLanguageResultExecution timeMemory
120042turbatMechanical Doll (IOI18_doll)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "ricehub.h" using namespace std; long long s[100005]; long long can(int l, int r){ int mid = (l + r + 1) / 2; return s[r] + s[l - 1] - s[mid] - s[mid - 1]; } int besthub(int R, int L, int X[], long long B){ int ans = 0; for (int i = 1;i <= R;i++) s[i] = s[i - 1] + X[i - 1]; for (int i = 1;i <= R;i++){ int l = i, r = R, mid; while (l != r){ mid = (l + r + 1) / 2; if (can(l, mid) <= B) l = mid; else r = mid - 1; } ans = max(ans, l - i + 1); } return ans; }

Compilation message (stderr)

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