# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
938134 | PagodePaiva | 늑대인간 (IOI18_werewolf) | C++17 | 231 ms | 19800 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "werewolf.h"
#include<bits/stdc++.h>
#define N 3010
using namespace std;
int lt, rt;
int mark[N][2];
vector <int> g[N];
void dfs(int node, int typ){
if(mark[node][typ]) return;
mark[node][typ] = 1;
if(lt <= node and node <= rt and typ == 0) dfs(node, 1);
for(auto x : g[node]){
if(typ == 0){
if(x < lt) continue;
dfs(x, typ);
}
else{
if(x > rt) continue;
dfs(x, typ);
}
}
return;
}
std::vector<int> check_validity(int n, std::vector<int> x, std::vector<int> y,
std::vector<int> s, std::vector<int> e,
std::vector<int> l, std::vector<int> r) {
for(int i = 0;i < x.size();i++){
int a = ++x[i], b = ++y[i];
g[a].push_back(b);
g[b].push_back(a);
}
vector <int> res;
for(int i = 0;i < s.size();i++){
int st = ++s[i], ed = ++e[i]; lt = ++l[i]; rt = ++ r[i];
memset(mark, 0, sizeof mark);
dfs(st, 0);
res.push_back(mark[ed][1]);
}
return res;
}
컴파일 시 표준 에러 (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... |