# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
471332 | spike1236 | Examination (JOI19_examination) | C++14 | 1883 ms | 67248 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 <iostream>
#include <map>
#include <unordered_map>
#include <vector>
#include <algorithm>
#pragma GCC optimize("O3")
#pragma GCC target("avx,avx2,fma")
using namespace std;
#define f first
#define s second
const int MAXN = 2e5 + 10;
pair <int, int> a[MAXN];
map <int, vector <vector <int> > > q;
vector <int> fw[MAXN], comp, comp2[MAXN];
int ans[MAXN];
int get_a(int v) {
return lower_bound(comp.begin(), comp.end(), v) - comp.begin() + 1;
}
int get_b(int x, int y) {
return lower_bound(comp2[x].begin(), comp2[x].end(), y) - comp2[x].begin() + 1;
}
void pre_upd(int x, int y) {
for(int i = get_a(x); i <= comp.size(); i += i & -i) comp2[i].push_back(y);
}
void pre_get(int x, int y) {
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |