# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
544528 | iulia13 | Synchronization (JOI13_synchronization) | C++14 | 579 ms | 40308 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;
const int N = 1e5 + 5;
const int LG = 20;
vector <int> g[N];
int dad[N][LG];
map <int, int> id[N];
int lvl[N], in[N], out[N], timp, card[N], inters[N], aib[N], n;
int lsb(int x)
{
return x & (-x);
}
void upd(int x, int val)
{
for (x; x <= n; x += lsb(x))
aib[x] += val;
}
int qry(int x)
{
int ans = 0;
for (x; x; x -= lsb(x))
ans += aib[x];
return ans;
}
void lifting() ///used
{
for (int j = 1; (1 << j) <= n; j++)
for (int i = 1; i <= n; i++)
dad[i][j] = dad[dad[i][j - 1]][j - 1];
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |