# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
417820 |
2021-06-04T11:00:23 Z |
ioi |
Rice Hub (IOI11_ricehub) |
C++14 |
|
1000 ms |
262148 KB |
#include "ricehub.h"
#include<bits/stdc++.h>
using namespace std ;
int besthub(int R, int L, int X[], long long B)
{
int mx = 0 ;
int e[L + 10] = {};
for(int i = 0 ; i < R ; i ++)
e[X[i]] ++ ;
for(int i = 1 ; i <= L ; i ++){
long long sum = B ;
int ans = 0 ;
int pl = i , pr = i;
int d = 0 ;
while(sum > 0 && (pl >=0 || pr < L + 9) ){
d ++ ;
pl -- , pr ++ ;
if(pl >= 0 && e[pl]){
if(sum > d)ans ++ , sum -= d ;
else break;
}
if(pr < L + 9 && e[pr]){
if(sum > d)ans ++ , sum -= d ;
else break;
}
}
mx = max(mx , ans);
}
return mx ;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
18 ms |
332 KB |
Output is correct |
2 |
Correct |
16 ms |
328 KB |
Output is correct |
3 |
Execution timed out |
1077 ms |
3916 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
60 ms |
740 KB |
Output is correct |
2 |
Correct |
61 ms |
740 KB |
Output is correct |
3 |
Runtime error |
144 ms |
262148 KB |
Execution killed with signal 9 |
4 |
Halted |
0 ms |
0 KB |
- |