# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
979413 | alontanay | Keys (IOI21_keys) | C++17 | 609 ms | 298880 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 "keys.h"
#include <bits/stdc++.h>
#define f first
#define s second
#define NEW_STATE 0
#define ACTIVE_STATE 1
#define OLD_STATE 2
#define NO_POS -1
using namespace std;
using pi = pair<int,int>;
const int MAX_N = 3e5+5;
namespace dsu {
int sz[MAX_N], root[MAX_N], L[MAX_N];
int PTR_pos[MAX_N];
stack<int> pos[MAX_N];
int PTR_ord_future[MAX_N];
priority_queue<pi> ord_future[MAX_N];
void init(int n) {
for(int i = 0; i < n; i ++) {
sz[i] = 1;
root[i] = i;
PTR_pos[i] = i;
PTR_ord_future[i] = i;
}
}
int get_root(int node) {
if(root[node] == node) {return node;}
# | 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... |