#include "ricehub.h"
#include "iostream"
#include "vector"
#include "map"
#include "math.h"
#include "string"
#include "algorithm"
#include "set"
#include <iterator>
#include <string.h>
#include <queue>
#include <list>
using namespace std;
typedef long long ll ;
const ll M = 1e9 + 7 ;
const ll oo = 1e13 ;
int besthub(int R, int L, int X[], long long B){
int best = 0 , l = 0 , l1 = X[0] ;
ll co = 0 ;
for(int i = 0 ; i < R ; ++i){
if(co + (X[i] - X[(l + i) / 2]) > B){
best = max(best , i - l + 1);
l = i ;
}else{
co += (X[i]- l1);
}
l1 = X[i];
}
return best;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
384 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
512 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |