Submission #411558

# Submission time Handle Problem Language Result Execution time Memory
411558 2021-05-25T13:51:00 Z jeqcho Rice Hub (IOI11_ricehub) C++17
Compilation error
0 ms 0 KB
#include "grader.h"

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<pair<int,int>> vpi;

#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define F0R(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define R0F(i,a) ROF(i,0,a)
#define trav(a,x) for (auto& a: x)

#define pb push_back
#define rsz resize
#define sz(x) int(x.size())
#define all(x) begin(x), end(x)
#define fi first

// subtask 1,2,3

int besthub(int R, int L, int X[], ll B){
	int mx=0;
	FOR(len,1,R+1)
	{
		F0R(i,R)
		{
			int las = i+len-1;
			if(las>=R)break;
			int mid = (i+las)/2;
			ll cur=0;
			FOR(j,i,las+1)
			{
				cur += (ll)abs(X[j]-X[mid]);
			}
			if(cur<=B)
			{
				mx=max(mx,len);
			}
		}
	}
	return mx;
}

Compilation message

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