Submission #1084917

#TimeUsernameProblemLanguageResultExecution timeMemory
1084917PakinDioxideRice Hub (IOI11_ricehub)C++17
0 / 100
4 ms608 KiB
#include "ricehub.h" #include <bits/stdc++.h> using namespace std; int besthub(int n, int m, int a[], long long x) { int mx = 0, l = 1, r = 0; auto recal = [&](){ long long sum = 0; int ll = l, rr = r; while (ll < rr) sum += a[rr--] + a[ll++]; return sum; }; while (r < n) { r++; while (recal() > x) l++; mx = max(mx, r - l + 1); } return mx; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...