# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
320981 | mhy908 | Mechanical Doll (IOI18_doll) | C++14 | 117 ms | 21820 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 "doll.h"
#include <bits/stdc++.h>
#define mp make_pair
#define eb emplace_back
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define svec(x) sort(all(x))
#define press(x) x.erase(unique(all(x)), x.end());
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
typedef pair<int, LL> pil;
typedef pair<LL, int> pli;
typedef pair<LL, LL> pll;
const int INF=1e9;
const LL LLINF=1e18;
int n, m, arr[200010], cnt[100010], num[200010];
vector<int> vc[100010], ret1, ret2, ret3;
int conn[100010], re, sp[30][200010];
pii sw[200010];
void make_tree(int nw, int k, int nwnum, int rt, int skp, int lg, int tot, int c){
if(k==2){
int l=sp[lg][nwnum], r=sp[lg][nwnum+1];
if(l<=skp)sw[nw].F=rt;
else sw[nw].F=vc[c][l-skp-1];
if(r<=skp)sw[nw].S=rt;
else sw[nw].S=vc[c][r-skp-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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |