Submission #410821

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4108212021-05-23 19:23:55LouayFarahRice Hub (IOI11_ricehub)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "racehub.h"
using namespace std;
int besthub(int R, int L, int X[], long long B)
{
if(R==1)
return 1;
if(B==0)
return 1;
long long b;
int sum = 0;
for(int x = 1; x<=L; x++)
{
b = B;
int l = x-1, r = x+1;
int res = 0;
while((r<R||l>=0)&&(b>=0))
{
if(l<0)
{
res++;
b-=abs(x-X[r]);
r++;
}
else if(r==R)
{
res++;
b-=abs(x-X[l]);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

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