# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
655210 |
2022-11-03T14:44:34 Z |
PanTkd |
Rice Hub (IOI11_ricehub) |
C++14 |
|
1000 ms |
468 KB |
#include "ricehub.h"
#include <iostream>
#include <cmath>
typedef long long ll;
using namespace std;
int besthub(int R, int L, int X[], long long B)
{
for(ll i = R;i>=1;i--){
for(ll j = 0;j<R-i;j++){
ll cost = 0;
ll med = (i)/2+j;
for(ll k = j ;k<j+i;k++){
cost+= abs(X[med]-X[k]);
}
if(cost<=B)
return i;
}
}
return 1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
312 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
308 KB |
Output is correct |
2 |
Correct |
2 ms |
212 KB |
Output is correct |
3 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1074 ms |
468 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |