Submission #1054920

#TimeUsernameProblemLanguageResultExecution timeMemory
1054920ducksaysquackRice Hub (IOI11_ricehub)C++98
100 / 100
14 ms3676 KiB
#include <bits/stdc++.h> using namespace std; int besthub(int n, int x, int v[], long long k) { long long 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...