# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
929858 | Pannda | Event Hopping 2 (JOI21_event2) | C++17 | 187 ms | 51276 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 = 1e9 + 12345;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, k;
cin >> n >> k;
vector<array<int, 2>> a(n);
set<array<int, 2>> existed;
for (int i = 0; i < n; i++) {
int l, r;
cin >> l >> r;
a[i] = {l, r};
if (existed.count(a[i])) {
a[i] = {-INF + 1, INF - 1};
} else {
existed.insert(a[i]);
}
}
auto [next, prev] = [](int n, vector<array<int, 2>> a) {
int log = 32 - __builtin_clz(n);
vector<vector<int>> next(n, vector<int>(log, -1));
vector<vector<int>> prev(n, vector<int>(log, -1));
vector<array<int, 3>> events;
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... |