zoukankan      html  css  js  c++  java
  • 未完

    #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;
    }

  • 相关阅读:
    python
    python
    python
    python
    python
    python
    python
    python
    人生苦短,我用python,为什么选择python,python简介
    Mysql-查询
  • 原文地址:https://www.cnblogs.com/HHshy/p/6187844.html
Copyright © 2011-2022 走看看