# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
130924 | rondojim | Werewolf (IOI18_werewolf) | C++17 | 1572 ms | 34932 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;
const int INF = 1e8;
struct segTree {
int N; vector<int> lows,highs;
segTree(int N): N(N), lows(2*N,INF), highs(2*N,-1) {}
pair<int,int> find(int a, int b) {
a += N; b += N;
if (a > b) swap(a,b);
int low = INF, high = -1;
while (a <= b) {
if (a%2 == 1) {
low = min(low,lows[a]);
high = max(high,highs[a]);
a++;
}
if (b%2 == 0) {
low = min(low,lows[b]);
high = max(high,highs[b]);
b--;
}
a /= 2; b /= 2;
}
return make_pair(low,high);
}
void upd(int i, int x) {
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... |