Submission #1003128

# Submission time Handle Problem Language Result Execution time Memory
1003128 2024-06-20T06:30:09 Z rahidilbayramli Rice Hub (IOI11_ricehub) C++17
0 / 100
35 ms 860 KB
#include<bits/stdc++.h>
#include "ricehub.h"
#define ll long long
#define ld long double
#define vl vector<ll>
#define vi vector<int>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define f first
#define s second
#define pb push_back
#define p_b pop_back
using namespace std;
int besthub(int R, int L, int X[], long long B)
{
    int n = R, i, j;
    int h[n+5];
    for(i = 1; i <= n; i++)
        h[i] = X[i-1];
    int res = 0;
    for(i = 1; i <= n; i++)
    {
        int g = 0;
        for(j = i + 1; j <= n; j++){
            g += (h[j] - h[j - 1]);
            if(g > B)
                break;
            res = max(res, j - i + 1);
        }
    }
    return res;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 35 ms 860 KB Output isn't correct
2 Halted 0 ms 0 KB -