# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1059124 | Tonyl | Jobs (BOI24_jobs) | C++17 | 241 ms | 83908 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;
using ll = long long;
#define int ll
using vi = vector<int>;
using pi = pair<ll,ll>;
#define REP(i,n) for (int i = 0; i < n; i++)
#define trav(a,x) for (auto& a : x)
#define D(x) //cerr << #x << ": " << x << endl;
#define all(x) (x).begin(), (x).end()
const int MAX_N = 3*1e5+3;
struct Info {
map<ll, ll> rew;
void add(int r) {
if (r == 0) return;
if (r > 0) {
rew[0] += r;
} else {
r*=-1;
ll rr = r;
//off += r;
// go erasing
while (rew.size() && rr) {
if (rew.begin()->second > rr) {
rew.begin()->second -= rr;
rr = 0;
} else {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |