# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
884690 | NeroZein | Cake 3 (JOI19_cake3) | C++17 | 3410 ms | 15164 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 "bits/stdc++.h"
using namespace std;
#ifdef Nero
#include "Deb.h"
#else
#define deb(...)
#endif
const int N = 2e5 + 5;
int n, m;
int cl, cr;
long long best, ans;
pair<int, int> a[N];
multiset<int> small, big;
void ins(int x) {
if ((int) big.size() < m) {
best += x;
big.insert(x);
return;
}
int y = *big.begin();
if (y < x) {
small.insert(y);
big.erase(big.find(y));
best -= y;
big.insert(x);
best += x;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |