Submission #360256

#TimeUsernameProblemLanguageResultExecution timeMemory
360256ksmzzang2003Rice Hub (IOI11_ricehub)C11
Compilation error
0 ms0 KiB
#include "ricehub.h" #include <bits/stdc++.h> #define MAXN 100005 typedef long long ll; using namespace std; static int N; ll X[MAXN],S[MAXN]; ll f(int s,int e) { int t = (s+e)/2; return S[e] - S[t] - X[t]*(e-t) +(t-s) *X[t] - (S[t-1]-S[s-1]); } int besthub(int n, int L, int x[], ll B) { N = n ; for(int i=0;i<N;i++) X[i+1] = x[i]; for(int i=1;i<=N;i++) S[i] = S[i-1] + X[i]; int s=1, e = 1,ans=-1987654321; while(1) { while(s+1<=e && f(s,e)>B) s++; ans = max(ans,e-s+1); e++; if(e>N) break; } return ans; }

Compilation message (stderr)

ricehub.c:2:10: fatal error: bits/stdc++.h: No such file or directory
    2 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.