Submission #460576

#TimeUsernameProblemLanguageResultExecution timeMemory
460576fuad27Rice Hub (IOI11_ricehub)C++14
Compilation error
0 ms0 KiB
#include "ricehub.h" #include<bits/stdc++.h> using namespace std; int besthub(int R, int L, int x[], long long B) { int MAX = 0; long long c = 0; for(int i = 0, j = 0;j<R;j++) { c += x[j] - x[(i + j)/2]; while(B - c < 0) { c -= x[(i + 1 + j)/2] - x[i]; i++; } MAX = max(MAX, j-i+1); } return MAX; } int main () { int X[5] = {1, 2, 10, 12, 14}; cerr<<besthub(5, 20, X, 6); }

Compilation message (stderr)

/usr/bin/ld: /tmp/cc9Vuab6.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccL9mk75.o:ricehub.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status