Submission #230726

# Submission time Handle Problem Language Result Execution time Memory
230726 2020-05-11T13:17:54 Z matir Rice Hub (IOI11_ricehub) C++14
0 / 100
99 ms 1400 KB
#include<bits/stdc++.h>
using namespace std;

int besthub(int R, int L, int X[], long long B)
{
    int bst = 0, cc = 0, nh = 1, mi = 0, li = 0, ri = 0;

    while(ri < R)
    {
        if(cc > B)
        {
            cc -= X[mi] - X[li];
            ++li;
            if(nh & 1) ++mi;
            --nh;
        }
        else
        {
            bst = max(bst, nh);
            ++ri;
            cc += X[ri] - X[mi];
            if(nh & 1) ++mi;
            ++nh;
        }

        cout << bst << cc << nh << mi << li << ri << endl;
    }

    return bst;
}
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 99 ms 1400 KB Output isn't correct
2 Halted 0 ms 0 KB -