题目:https://loj.ac/problem/3089 没想到把根号之类的求对数变成算数平均值.写了个只能得15分的暴力. #include<cstdio> #include<cstring> #include<algorithm> #define db double using namespace std; ,K=; ; ,c[N][K],fl[N]; db ans; ],nxt[N<<],vl[N],sm[N]; int l[N],v[N],dy[…
含[最小生成树Prim]模板. Prim复杂度为$O(n^2),适用于稠密图,特别是完全图的最小生成树的求解. Desert King Time Limit: 3000MS Memory Limit: 65536K Total Submissions:31622 Accepted: 8670 Description David the Great has just become the king of a desert country. To win the respect of h…