# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
738702 | Stickfish | Village (BOI20_village) | C++17 | 141 ms | 17004 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <vector>
#include <bitset>
#include <algorithm>
#include <numeric>
using namespace std;
const int MAXN = 1e5 + 123;
vector<int> edg[MAXN];
bitset<MAXN> used;
int rt[MAXN];
bool dfs_getmark(int v, bitset<MAXN>& mark) {
bool is_edge = false;
for (auto u : edg[v]) {
if (u == rt[v])
continue;
rt[u] = v;
is_edge |= dfs_getmark(u, mark);
}
if (v == 0) {
mark[v] = 1;
if (is_edge)
return true;
for (auto u : edg[v]) {
if (u == rt[v])
continue;
mark[u] = 0;
return true;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |