# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
163658 | georgerapeanu | Cake 3 (JOI19_cake3) | C++11 | 3292 ms | 19060 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
const int NMAX = 2e5;
int n,m;
pair<int,int> v[NMAX + 5];
vector<int> vals;
map<int,int> stuff;
pair<long long,int> aib[NMAX + 5];
void update(int pos,pair<int,int> val) {
pos = (int)vals.size() - pos + 1;///for enhanced binary searche
for(; pos <= (int)vals.size(); pos += (-pos) & pos) {
aib[pos].first += val.first;
aib[pos].second += val.second;
}
}
long long get_best_sum(int cnt) {
pair<long long,int> lst = {0,0};
int pos = 0;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |