# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
534873 |
2022-03-09T05:25:29 Z |
Gurban |
Rice Hub (IOI11_ricehub) |
C++17 |
|
1000 ms |
396 KB |
#include <bits/stdc++.h>
#include "ricehub.h"
using namespace std;
using ll = long long;
int besthub(int R, int L, int X[], long long B){
// p[0] = X[0];
// for(int i = 1;i < R;i++) p[i] = p[i - 1] + X[i];
int ans = 1;
for(int i = 0;i < R;i++){
for(int j = 0;j < i;j++){
int md = (i + j) >> 1;
ll now = 0;
for(int k = j;k <= md;k++) now += X[md] - X[k];
for(int k = md+1;k <= i;k++) now += X[k] - X[md];
if(now <= B) ans = max(ans,i - j + 1);
}
}
return ans;
}
// int main(){
// ios::sync_with_stdio(false);
// cin.tie(0);
// }
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
308 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
300 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
272 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
1 ms |
204 KB |
Output is correct |
9 |
Correct |
0 ms |
204 KB |
Output is correct |
10 |
Correct |
0 ms |
204 KB |
Output is correct |
11 |
Correct |
1 ms |
204 KB |
Output is correct |
12 |
Correct |
1 ms |
204 KB |
Output is correct |
13 |
Correct |
0 ms |
300 KB |
Output is correct |
14 |
Correct |
1 ms |
204 KB |
Output is correct |
15 |
Correct |
1 ms |
204 KB |
Output is correct |
16 |
Correct |
1 ms |
204 KB |
Output is correct |
17 |
Correct |
1 ms |
204 KB |
Output is correct |
18 |
Correct |
1 ms |
204 KB |
Output is correct |
19 |
Correct |
1 ms |
308 KB |
Output is correct |
20 |
Correct |
1 ms |
204 KB |
Output is correct |
21 |
Correct |
20 ms |
204 KB |
Output is correct |
22 |
Correct |
18 ms |
204 KB |
Output is correct |
23 |
Correct |
18 ms |
300 KB |
Output is correct |
24 |
Correct |
18 ms |
308 KB |
Output is correct |
25 |
Correct |
18 ms |
204 KB |
Output is correct |
26 |
Correct |
19 ms |
300 KB |
Output is correct |
27 |
Correct |
21 ms |
204 KB |
Output is correct |
28 |
Correct |
18 ms |
300 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
204 KB |
Output is correct |
3 |
Correct |
98 ms |
308 KB |
Output is correct |
4 |
Correct |
111 ms |
204 KB |
Output is correct |
5 |
Correct |
19 ms |
308 KB |
Output is correct |
6 |
Correct |
18 ms |
204 KB |
Output is correct |
7 |
Correct |
140 ms |
288 KB |
Output is correct |
8 |
Correct |
135 ms |
204 KB |
Output is correct |
9 |
Correct |
18 ms |
300 KB |
Output is correct |
10 |
Correct |
18 ms |
304 KB |
Output is correct |
11 |
Correct |
71 ms |
204 KB |
Output is correct |
12 |
Correct |
71 ms |
292 KB |
Output is correct |
13 |
Correct |
134 ms |
292 KB |
Output is correct |
14 |
Correct |
138 ms |
304 KB |
Output is correct |
15 |
Correct |
18 ms |
288 KB |
Output is correct |
16 |
Correct |
18 ms |
300 KB |
Output is correct |
17 |
Correct |
67 ms |
304 KB |
Output is correct |
18 |
Correct |
79 ms |
204 KB |
Output is correct |
19 |
Correct |
139 ms |
204 KB |
Output is correct |
20 |
Correct |
137 ms |
308 KB |
Output is correct |
21 |
Execution timed out |
1086 ms |
332 KB |
Time limit exceeded |
22 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1070 ms |
396 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |