Submission #1054914

#TimeUsernameProblemLanguageResultExecution timeMemory
1054914ducksaysquackRice Hub (IOI11_ricehub)C++98
68 / 100
7 ms1884 KiB
#include <bits/stdc++.h> using namespace std; int besthub(int n, int x, int v[], long long k) { int 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...