# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
701365 | GusterGoose27 | Arranging Tickets (JOI17_arranging_tickets) | C++11 | 1790 ms | 29404 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;
typedef long long ll;
typedef pair<int, int> pii;
const int MAXN = 2e5;
const int MAXM = 1e5;
int n, m;
ll overall[MAXN];
ll arr[MAXN];
ll req_red[MAXN];
ll r_end[MAXN];
vector<pii> ranges[MAXN]; // right endpoint, index
ll max(ll a, ll b) {
if (a > b) return a;
return b;
}
ll num_req(int target) {
for (int i = 0; i < n; i++) req_red[i] = max(0, arr[i]-target);
fill(r_end, r_end+n, 0);
priority_queue<pii> pq;
ll sub = 0;
ll num = 0;
for (pii i: ranges[0]) pq.push(i);
for (int i = 0; i < n; i++) {
if (sub < req_red[i]) {
# | 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... |