# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
992577 | 2024-06-04T17:45:15 Z | MrDeboo | Rice Hub (IOI11_ricehub) | C++17 | 2 ms | 600 KB |
#include "ricehub.h" #include "bits/stdc++.h" using namespace std; int besthub(int r, int l, int x[], long long b){ deque<pair<long long,long>>dq; int ans=0; for(int i=0;i<r;i++){ dq.push_back({(long long)x[i]+(dq.empty()?0ll:dq.back().first),x[i]}); while(dq.size()>1&&((dq.back().first-(dq[0].first-dq[0].second))-dq[dq.size()/2].second*(dq.size()-dq.size()/2))+(dq[dq.size()/2].second*(dq.size()/2)-(dq[dq.size()/2-1].first-(dq[0].first-dq[0].second)))>b)dq.pop_front(); ans=max(ans,(int)dq.size()); } return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Incorrect | 0 ms | 348 KB | Output isn't correct |
5 | 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 | 2 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |