Submission #496558

# Submission time Handle Problem Language Result Execution time Memory
496558 2021-12-21T14:15:22 Z palilo Rice Hub (IOI11_ricehub) C++17
0 / 100
2 ms 332 KB
#include <bits/stdc++.h>

int besthub(int n, int _, int* a, long long b) {
    int ret = 0;
    for (int l = 0, r = 0; l < n; ++l) {
        for (; r != n && b >= 0; ++r) {
            b -= a[r] - a[(l + r) >> 1];
        }
        ret = std::max(ret, r - l);
        b += a[(l + r) >> 1] - a[l];
    }
    return ret;
}
# 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 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -