# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
125487 | imyujin | Long Mansion (JOI17_long_mansion) | C++14 | 1177 ms | 145976 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 <stdio.h>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
#define MAXN 500005
int N;
vector<int> A[MAXN];
int B[MAXN], C[MAXN], X[MAXN], Y[MAXN];
int left[MAXN], rig[MAXN], lefinv[MAXN], riginv[MAXN];
int L[MAXN], R[MAXN], Rinv[MAXN];
int lastkey[MAXN], sparse[20][MAXN];
vector<int> mn[MAXN], mnt[MAXN];
void findleft(vector<int> A[], int C[], int left[]) {
for(int i = 1; i <= N; i++) lastkey[i] = 0;
for(int i = 1; i < N; i++) {
for(auto a : A[i]) lastkey[a] = i;
left[i] = lastkey[C[i]];
}
left[0] = left[N] = 0;
}
void setL(int left[], int rig[], int L[]) {
priority_queue<int> pq, pqt;
//printf("*\n");
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... |