Submission #460565

# Submission time Handle Problem Language Result Execution time Memory
460565 2021-08-09T07:36:08 Z fuad27 Rice Hub (IOI11_ricehub) C++14
0 / 100
3 ms 332 KB
#include "ricehub.h"
#include<bits/stdc++.h>
using namespace std;
int besthub(int R, int L, int x[], long long B) {
	int MAX = 0;
	for(int i = 0, j = 0;j<R;j++) {
		long long c = x[j] - x[(i + j)/2];
		while(c > B) {
			 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};
	cout<<besthub(5, 20, X, 6);			
}
*/
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Incorrect 0 ms 204 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Incorrect 0 ms 204 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -