# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1110800 | whoknow | Index (COCI21_index) | C++17 | 1368 ms | 53684 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 ll long long
#define F first
#define S second
#define MAXN 200005
#define MAXTREE 4000005
#define ii pair<int,int>
#define bit(i,j) ((i>>j)&1)
#define sz(i) (int)i.size()
#define endl '\n'
using namespace std;
int n, ntest;
int a[MAXN];
namespace sub1
{
int node, MX;
int st[MAXTREE], root[MAXN];
ii child[MAXTREE];
void update(int id, int pre, int l, int r, int u)
{
if(l == r)
return st[id] = st[pre] + 1, void();
int mid = (l + r) / 2;
node++;
if(u <= mid)
{
child[id].F = node;
child[id].S = child[pre].S;
update(node, child[pre].F, l, mid, u);
}
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... |