Brief Description 求外圈有\(n\)个点的, 形态如图所示的无向图的生成树个数. Algorithm Design \[f(n) = (3*f(n-1)-f(n-2)+2)\] Code #include <cstdio> int mod = 10; struct data { int a[50], len; } f[3]; int n; inline int min(int a, int b) { return a < b ? a : b; } data mul(da…
In some countries building highways takes a lot of time... Maybe that's because there are many possiblities to construct a network of highways and engineers can't make up their minds which one to choose. Suppose we have a list of cities that can be c…