Language: C++

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
#include<stack>
using namespace std;
typedef long long ll;
const ll N=205;
const ll mod=1e9+7;
vector<int>edge[N];
ll dfn[N],low[N],tot;
struct node{
    int u,v,nxt;
}edge[N];
int head[N],mcnt;
void add_edge(int u,int v){
    mcnt++;
    edge[mcnt].u=u;
    edge[mcnt].v=v;
    edge[mcnt].nxt=head[u];
    head[u]=mcnt;
}
int s[N],top;
ll scc[N],sccc;
bool vis[N];
ll p[N];
bool vis[N];
ll n,m,k;
ll gcd(ll x,ll y){
    ll t;
    while(y){
        t=x%y;
        x=y;
        y=t;
    }
    return x;
}
ll ksm(ll x,ll y){
    ll res=1;
    while(y){
        if(y&1)
            res=(res*x)%mod;
        x=(x*x)%mod;
        y>>=1;
    }
    return res;
}
ll polya(ll x){
    ll res=0;
    for(int i=1;i<=x;i++)
        res+=ksm(k,gcd(x,i)),res%=mod;
    res*=ksm(x,mod-2);
    res%=mod;
    return res;
}
ll u1[N],v1[N];
ll fact[N+1],inv[N+1];
ll ans=1;
void pre(){
    fact[0]=1;
    for(int i=1;i<=N;i++)
        fact[i]=(fact[i-1]*i)%mod;
    inv[N]=ksm(fact[N],mod-2);
    for(int i=N-1;i>=1;i--)
        inv[i]=(inv[i+1]*(i+1))%mod;
    inv[0]=1;
}
ll C(ll x,ll y){
    return fact[x]*inv[y]%mod*inv[x-y]%mod;
}
void dfs(ll u,ll fa){
    tot++;
    dfn[u]=low[u]=tot;
    s.push(u);
    for(int i=head[u];i;i=edge[i].nxt){
        ll v=edge[i].v;
        if(v==fa)
            continue ;
        if(!dfn[v]){
            s.push(i);
            dfs(v,u);
            low[u]=min(low[u],low[v]);
            if(low[v]>=dfn[u]){
                bool cir=1;
                int cnt=0;
                ll sum=0;
                int x;
                int sz=0;
                for(int j=top;s[j+1]!=i;sz++,j--)
                    if(vis[edge[s[j]].v])
                        cir=0;
                    else
                        vis[edge[s[j]].v]=1;
                if(cir){
                    ans*=polya(sz);
                    ans%=mod;
                }
                else{
                    ans*=C(sz+k-1,k-1);
                    ans%=mod;
                }
                while(s[top+1]!=i){
                    vis[s[top].v]=0;
                    top--;
                }
            }
        }
        else
            low[u]=min(low[u],dfn[v]);
    }
}
int main()
{
    scanf("%lld%lld%lld",&n,&m,&k);
    for(ll i=1;i<=m;i++){
        ll u,v;
        scanf("%lld%lld",&u,&v);
        edge[u].push_back(v);
        edge[v].push_back(u);
        u1[i]=u;
        v1[i]=v;
    }
    pre();
    for(ll i=1;i<=n;i++)
        if(!dfn[i])
            dfs(i,-1);
    printf("%lld\n",ans);
}


Compiler output:
a.cc:14:2: error: conflicting declaration 'node edge [205]'
   14 | }edge[N];
      |  ^~~~
a.cc:10:12: note: previous declaration as 'std::vector<int> edge [205]'
   10 | vector<int>edge[N];
      |            ^~~~
a.cc: In function 'void add_edge(int, int)':
a.cc:18:16: error: 'class std::vector<int>' has no member named 'u'
   18 |     edge[mcnt].u=u;
      |                ^
a.cc:19:16: error: 'class std::vector<int>' has no member named 'v'
   19 |     edge[mcnt].v=v;
      |                ^
a.cc:20:16: error: 'class std::vector<int>' has no member named 'nxt'
   20 |     edge[mcnt].nxt=head[u];
      |                ^~~
a.cc: At global scope:
a.cc:27:6: error: redefinition of 'bool vis [205]'
   27 | bool vis[N];
      |      ^~~
a.cc:25:6: note: 'bool vis [205]' previously declared here
   25 | bool vis[N];
      |      ^~~
a.cc: In function 'void dfs(ll, ll)':
a.cc:74:7: error: request for member 'push' in 's', which is of non-class type 'int [205]'
   74 |     s.push(u);
      |       ^~~~
a.cc:75:35: error: 'class std::vector<int>' has no member named 'nxt'
   75 |     for(int i=head[u];i;i=edge[i].nxt){
      |                                   ^~~
a.cc:76:22: error: 'class std::vector<int>' has no member named 'v'
   76 |         ll v=edge[i].v;
      |                      ^
a.cc:80:15: error: request for member 'push' in 's', which is of non-class type 'int [205]'
   80 |             s.push(i);
      |               ^~~~
a.cc:90:39: error: 'class std::vector<int>' has no member named 'v'
   90 |                     if(vis[edge[s[j]].v])
      |                                       ^
a.cc:93:40: error: 'class std::vector<int>' has no member named 'v'
   93 |                         vis[edge[s[j]].v]=1;
      |                                        ^
a.cc:103:32: error: request for member 'v' in 's[top]', which is of non-class type 'int'
  103 |                     vis[s[top].v]=0;
      |                                ^