# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
195357 | kdh9949 | 늑대인간 (IOI18_werewolf) | C++17 | 1998 ms | 149496 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "werewolf.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 200005, LG = 18;
int n, q, p[2 * N], tim[2][2 * N], sgs[2][2 * N], sge[2][2 * N], cnt;
int sp[2][LG][2 * N];
vector<int> e[N], t[2 * N];
struct Qry{ int i, s, e, sgn; };
vector<Qry> qv[N];
vector<int> pos[N];
int f(int x){ return p[x] = (x == p[x] ? x : f(p[x])); }
void aft(int id, int x){
if(x < n){
sgs[id][x] = sge[id][x] = ++cnt;
return;
}
sgs[id][x] = N;
for(int i : t[x]){
aft(id, i);
sgs[id][x] = min(sgs[id][x], sgs[id][i]);
sge[id][x] = max(sge[id][x], sge[id][i]);
}
}
struct Fen{
컴파일 시 표준 에러 (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... |