# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
417813 |
2021-06-04T10:49:05 Z |
ioi |
Rice Hub (IOI11_ricehub) |
C++14 |
|
3 ms |
716 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[R + 10] = {};
for(int i = 0 ; i < R ; i ++)
e[X[i]] ++ ;
for(int i = 1 ; i <= L ; i ++){
int sum = B ;
int ans = 0 ;
int pl = i , pr = i;
int d = 0 ;
while(sum > 0&& pl >= 0){
d ++ ;
pl -- , pr ++ ;
if(e[pl]){
if(sum > d)ans ++ , sum -= d ;
else break;
}
if(e[pr]){
if(sum > d)ans ++ , sum -= d ;
else break;
}
}
mx = max(mx , ans);
}
return mx ;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
332 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
332 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
332 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
3 ms |
716 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |