# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
531883 | cadmiumsky | 동기화 (JOI13_synchronization) | C++14 | 458 ms | 23908 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int nmax = 1e5 + 5;
vector<int> g[nmax];
pair<int,int> edg[nmax];
int n;
namespace DSU {
int pin[nmax], pout[nmax], father[nmax][18], inp = 1, state[nmax],
sz[nmax], isc[nmax];
void initP(int node, int f) {
pin[node] = inp++;
father[node][0] = f;
for(int i = 1; i < 18; i++)
father[node][i] = father[father[node][i - 1]][i - 1];
for(auto x : g[node]) {
if(x == f)
continue;
initP(x, node);
}
pout[node] = inp - 1;
}
namespace AIB {
#define lsb(x) (x & -x)
int tree[nmax];
void upd(int poz, int val) {
while(poz <= n) {
tree[poz] += val;
poz += lsb(poz);
# | 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... |