# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
393020 | oolimry | Event Hopping 2 (JOI21_event2) | C++17 | 1969 ms | 23132 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;
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int) x.size())
#define show(x) cerr << #x << " is " << x << endl;
#define show2(x, y) cerr << #x << " is " << x << ", " << #y << " is " << y << endl;
typedef long long lint;
typedef pair<lint, lint> ii;
const lint inf = 0x3f3f3f3f;
struct range{ int l, r, id; };
vector<range> ranges;
int p[19][200005];
int order[200005];
set<ii> taken;
lint solve(lint s, lint limit){
if(ranges[s].r > limit) return 0;
lint res = 0;
for(int k = 18;k >= 0;k--){
int ns = p[k][s];
if(ranges[ns].r <= limit){
res += (1<<k);
s = ns;
}
}
return res+1;
}
# | 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... |