# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
237232 | rama_pang | New Home (APIO18_new_home) | C++14 | 2383 ms | 83692 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;
const int INF = 1e8;
const int MAXN = 3e5 + 5;
int N, K, Q;
int X[MAXN];
int ans[MAXN];
vector<array<int, 2>> shops[MAXN]; // shops[type] = (time, id)
array<int, 3> queries[MAXN]; // (x-coord, time, id)
auto active_cmp = [&](int a, int b) {
if (X[a] != X[b]) return X[a] < X[b];
return a < b;
};
map<int, int, decltype(active_cmp)> active(active_cmp);
void Solve() {
vector<array<int, 4>> lines; // (x1, x2, t1, t2)
int sz = 2 * N + 1;
vector<int> segtree(2 * sz, 0); // of time
for (int k = 0; k < K; k++) {
active.clear();
active[N + 0] = 0;
active[N + 1] = 0;
for (auto s : shops[k]) {
if (active.count(s[1]) == 0) {
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |