# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1029751 | parsadox2 | Werewolf (IOI18_werewolf) | C++17 | 1897 ms | 38596 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 = 2e5 + 10;
int n , m , q , pos[N];
vector <int> adj[N] , vec;
struct SEG{
int mn[N << 2] , mx[N << 2];
void Build(int node = 1 , int nl = 0 , int nr = n)
{
if(nr - nl == 1)
{
mn[node] = mx[node] = vec[nl];
return;
}
int mid = (nl + nr) >> 1 , lc = node << 1 , rc = lc | 1;
Build(lc , nl , mid); Build(rc , mid , nr);
mn[node] = min(mn[lc] , mn[rc]);
mx[node] = max(mx[lc] , mx[rc]);
}
int Getmn(int l , int r , int node = 1 , int nl = 0 , int nr = n)
{
if(nr <= l || r <= nl)
return n;
if(l <= nl && nr <= r)
return mn[node];
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... |