bzoj1051 受欢迎的牛 tarjan
存一个tarjan模板就跑。#include<iostream>
#include<cstdio>
#include<stack>
using namespace std;
int fst[10005],nxt[100005],to[100005];
int tot=1;
void build(int f,int t)
{
to[++tot]=t;
nxt[tot]=fst[f];
原创
2016-07-28 15:31:09 ·
429 阅读 ·
0 评论