#include <bits/stdc++.h>
using namespace std;
namespace SAT{
const int maxn = 20005;
const int maxm = 5000005;
int n;
int he[maxn],ver[maxm],ne[maxm],tot;
int dfn[maxn],low[maxn],c[maxn],st[maxn],top,tim,color;
vector<int> bcc[maxn];
void init(int _n){
n = _n;
for( int i = 0; i < 2*n;i ++ ){
he[i] = 0;
dfn[i] = 0;
c[i] = 0;
bcc[i].clear();
}
tim = top = color = 0;
tot = 1;
}
void add( int x,int y ){
ver[++tot] = y;
ne[tot] = he[x];
he[x] = tot;
}
void tarjan( int x ){
st[++top] = x;
dfn[x] = low[x] = ++tim;
for( int cure = he[x]; cure; cure = ne[cure] ){
int y = ver[cure];
if( !dfn[y] ){
tarjan(y);
bzoj 1997 判断是否为平面图
最新推荐文章于 2022-03-30 11:45:27 发布