AtCoder Beginner Contest 133 E - Virus Tree 2(组合数学)

题意

n个点的树k种颜色,距离不超过2的点对需颜色不同,求方案数

Code(copy)

#include
#include
#include
#include
#include

typedef long long LL;

const int N=100005;
const int MOD=1000000007;

int n,k,jc[N],ny[N],ans,cnt,last[N];
struct edge{int to,next;}e[N*2];

int A(int n,int m)
{
    return n

转载于:https://www.cnblogs.com/y2823774827y/p/11148892.html

你可能感兴趣的:(AtCoder Beginner Contest 133 E - Virus Tree 2(组合数学))