Submission #139464

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

using namespace std;

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

long long besthub(long long _r, long long _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/cczjSElg.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