# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
116295 | mirbek01 | Werewolf (IOI18_werewolf) | C++11 | 1086 ms | 66732 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>
# include "werewolf.h"
using namespace std;
const int N = 4e5 + 2;
int ver[N], pos[N], n, t[2][18][N], lg[N];
vector <int> g[N];
int get(int l, int r, int tp){
int curlog = lg[r - l + 1];
if(tp)
return max(t[1][curlog][l], t[1][curlog][r - (1 << curlog) + 1]);
else
return min(t[0][curlog][l], t[0][curlog][r - (1 << curlog) + 1]);
}
void dfs(int v, int par = -1){
ver[++ n] = v;
for(int to : g[v]){
if(to == par)
continue;
dfs(to, v);
}
}
int used[N], d[N];
void dfs(int v, int tp, int x){
used[v] = 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... |