# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
875149 | StefanL2005 | Arranging Shoes (IOI19_shoes) | C++14 | 1091 ms | 17656 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>
using namespace std;
#define ll long long
void update(int node, int left, int right, int point, vector<int> &tree)
{
if (left == right)
tree[node] = 1;
else
{
int m = (left + right) / 2;
if (point <= m)
update(2*node, left, m, point, tree);
else
update(2*node + 1, m + 1, right, point , tree);
tree[node] = tree[2*node] + tree[2*node + 1];
}
}
int querry(int node, int l, int r, int ql, int qr, vector<int> &tree)
{
if (ql <= l && r <= qr)
return tree[node];
int m = (l + r) / 2;
if (qr <= m)
return querry(2 * node, l, m, ql, qr, tree);
# | 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... |