HDU-4408-Minimum Spanning Tree

HDU-4408-Minimum Spanning Tree

http://acm.hdu.edu.cn/showproblem.php?pid=4408

最小生成树的个数

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#define N 405
#define M 4005
#define inf 0x3f3f3f3f
#define dinf 1e10
#define linf (LL)1<<60
#define LL long long
#define clr(a,b) memset(a,b,sizeof(a))
using namespace std;
LL mod;
struct Edge
{
    int a,b,c;
    bool operator<(const Edge & t)const
    {
        return cgra[N];
int findfa(int a,int b[]){return a==b[a]?a:b[a]=findfa(b[a],b);}
LL det(LL a[][N],int n)
{
    for(int i=0;i1)
                    {
                        for(int a=1;a<=n;a++)
                            for(int b=1;b<=n;b++)
                                tmp[a][b]=0;
                        int len=gra[i].size();
                        for(int a=0;a


你可能感兴趣的:(ACM_图论)