# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
119426 | onjo0127 | Werewolf (IOI18_werewolf) | C++11 | 1907 ms | 159112 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 "werewolf.h"
#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
struct segtree {
vector<int> T;
int get(int idx, int s, int e, int l, int r) {
if(r < s || e < l) return 0;
if(l <= s && e <= r) return T[idx];
int m = s+e >> 1;
return get(idx*2, s, m, l, r) + get(idx*2+1, m+1, e, l, r);
}
void upd(int idx, int s, int e, int p, int v) {
if(p < s || e < p) return;
if(s == e) {
T[idx] = v;
return;
}
int m = s+e >> 1;
upd(idx*2, s, m, p, v);
upd(idx*2+1, m+1, e, p, v);
T[idx] = T[idx*2] + T[idx*2+1];
}
segtree(int sz) { T.resize(4*sz); }
};
struct UF {
int P[400009], X[400009];
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... |