未完

#include<cstdio>
using namespace std;

int read()
{
int x=0; char ch=getchar();
while (ch<'0' || ch>'9') ch=getchar();
while (ch>='0' && ch<='9') x=(x<<1)+(x<<3)+ch-48,ch=getchar();
return x;
}

void add(int x,int y) { v[++cnt]=y,nex[cnt]=hea[x],hea[x]=cnt; }

void tarjan(int x)
{
dfn[x]=low[x]=++tim;
for (int i=hea[x];i;i=nex[i])
if ()
}

int main()
{
int n=read(),m=read(),q=read(),i;
for (i=1;i<=n;++i) w[i]=read();
for (i=1;i<=m;++i)
{
int x=read(),y=read();
add(x,y),add(y,x);
}
for (i=1;i<=n;++i)
if (!dfn[i]) tarjan(i);
return 0;
}

posted @ 2016-12-16 17:41  HHshy  阅读(182)  评论(0编辑  收藏  举报