Submission #139465

# Submission time Handle Problem Language Result Execution time Memory
139465 2019-07-31T19:49:19 Z Sorting Rice Hub (IOI11_ricehub) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

using namespace std;

long long *x, b;
int l, r;

int besthub(int _r, int _l, long long *_x, long long _b){
	r = _r;
	l = _l;
	x = _x;
	b = _b;

	int ans = 0;

	for(int i = 0; i < r; i++){
		int j;

		for(j = i; j < r && x[j] - x[i] <= 2 * b; j++);
		j--;
		ans = max(ans, j - i + 1);
	}

	return ans;
}	

Compilation message

/tmp/ccc7sEjD.o: In function `main':
grader.cpp:(.text.startup+0x92): undefined reference to `besthub(int, int, int*, long long)'
collect2: error: ld returned 1 exit status