Submission #1054920

# Submission time Handle Problem Language Result Execution time Memory
1054920 2024-08-12T13:03:13 Z ducksaysquack Rice Hub (IOI11_ricehub) C++
100 / 100
14 ms 3676 KB
#include <bits/stdc++.h>
using namespace std;
int besthub(int n, int x, int v[], long long k) {
	long long l = 0, r = 0, c = 0, ans = 0;
	while(r != n-1) {
		r++, c += v[r]-v[(l+r)/2]; 
		while(c > k) c -= v[(l+r+1)/2]-v[l], l++;
		ans = max(ans, r-l+1);
	}
	return ans;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 420 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 344 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 1 ms 344 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 1 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 1 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 6 ms 2596 KB Output is correct
4 Correct 6 ms 2580 KB Output is correct
5 Correct 4 ms 2908 KB Output is correct
6 Correct 3 ms 2908 KB Output is correct
7 Correct 6 ms 3420 KB Output is correct
8 Correct 6 ms 3420 KB Output is correct
9 Correct 3 ms 2904 KB Output is correct
10 Correct 3 ms 2908 KB Output is correct
11 Correct 7 ms 3676 KB Output is correct
12 Correct 14 ms 3676 KB Output is correct
13 Correct 3 ms 2908 KB Output is correct
14 Correct 3 ms 2904 KB Output is correct
15 Correct 5 ms 3372 KB Output is correct
16 Correct 5 ms 3416 KB Output is correct
17 Correct 6 ms 3420 KB Output is correct
18 Correct 6 ms 3672 KB Output is correct
19 Correct 11 ms 3676 KB Output is correct
20 Correct 7 ms 3436 KB Output is correct