# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1120713 | vjudge1 | Event Hopping (BOI22_events) | C++17 | 909 ms | 319948 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>
#define f first
#define s second
#define ent '\n'
#define int long long
typedef long long ll;
using namespace std;
const int maxn = 2e5 + 12;
const int mod = 1e9 + 7;
vector<int> g[maxn];
int d[maxn];
int up[20][maxn];
int ans[5005][5005];
int l[maxn], r[maxn];
int n, q;
void solve5000(vector<pair<int, int>> u) {
for(int j = 1; j <= n; j++) {
pair<int, int> mx = {-1, -1};
for(auto [x, pos] : u) {
if(pos < 0) {
if(r[-pos] > r[j]) continue;
mx = max(mx, {r[-pos], -pos});
}
else {
if(r[pos] > r[j]) continue;
g[mx.second].push_back(pos);
}
# | 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... |