nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 生成树一个无向图的生成树指的是从图中选若干边构成边集,全部点构成点集,使得这个边集加上点集恰好是一棵树。 生成树计数一个无向无权图(允许重边不允许自环)的邻接矩阵为g,显然这是一个对称矩阵,g[u][v]代表边(u,v)的重数,即若存在一条边(u,v)则g[u][v]的值为1,若存在k条,则g[u][v]的值为k。一个无向无权图(允许重边不允许自环)的度数矩阵为deg,显然这是一个对角矩阵,deg[u...

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial nameEasy Math Problem descirptionOne day, Touma Kazusa encountered a easy math problem. Given n and k, she need to calculate the following sum modulo...

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial min25筛是什么min25筛是一种筛法,他能以亚线性的时间复杂度筛出一类函数的前缀和 定义一部分符号$M(x) x\gt1$代表$x$的最小质因子 我们再设$P_j$为第$j$小的质数,...

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 中间结论$$f_n = \sum_{i=0}^n (-1)^i {n \choose i} g_i\Leftrightarrowg_n = \sum_{i=0}^n (-1)^i {n \choose i} f_i$$ $$f_n =...

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial ###name种花家的零食 ###descirption在很久以前,有一颗蓝星,蓝星上有一个种花家。种花家有1到n共n包零食,同时种花家的兔子又有1到n共n个朋友(比如毛熊,鹰酱,脚盆鸡等)。昨天,兔子的n个朋友都到他家来玩了。他的n个朋友瓜分了他的n包零食,每个人都恰好吃了一包零食,没有两个人吃了同一包零食。兔子发现,第i个朋友吃第j包零食能获得的愉悦值是$i\mod...

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial 有这样一类问题,他们的形式常常是这个样子$$\begin{aligned}\sum_{i=1}^n{f(i)[gcd(i,j)=1]}\end{aligned}$$ 我们来对他进行变形$$\begin{aligned}&\sum_{i=1}^n{f(i)[gcd(i,j)=...

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial ###namearray ###descirptionYou are given an array $a_1,a_2,…,a_n(∀i∈[1,n],1≤a_i≤n)$. Initially, each element of the array is unique. Moreover, there are m instructions. Each instruction is in one of the...

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial ###name ###descirption ###input ###output ###sample input ###sample...

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial ###nameString ###descirptionTom has a string containing only lowercase letters. He wants to choose a subsequence of the string whose length is k and lexicographical order is the smallest. It’s simple...

nexthexonextbutterflyvolantisyearnyiliashokaindigoapollolandscapecactusmateryicarusfluidmaterial ###nameMeteor ###descirptionhough time passes, there is always someone we will never forget.“The probability of being hit by a meteor is one in a billion, but it is much more miraculous, to meet you in...