# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
388367 | pure_mem | Synchronization (JOI13_synchronization) | C++14 | 304 ms | 20220 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 X first
#define Y second
#define MP make_pair
#define ll long long
using namespace std;
const int MAXN = 100012, INF = 1e9 + 7;
const int MOD = 998244353;
int n, m, q, sz[MAXN], parent[MAXN];
vector<int> graph[MAXN];
int hldPtr, hldCnt, hld[MAXN], hldCmp[MAXN], hldSt[MAXN], hldId[MAXN];
pair<int, int> road[MAXN];
bool isRoad[MAXN];
int t[MAXN * 4];
void upd(int v, int tl, int tr, int pos){
if(tl > pos || pos > tr)
return;
if(tl == tr){
t[v] ^= 1;
return;
}
int tm = (tl + tr) / 2;
upd(v * 2, tl, tm, pos);
upd(v * 2 + 1, tm + 1, tr, pos);
t[v] = t[v * 2] + t[v * 2 + 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... |