2019 浙江省赛部分题解(The 16th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple)
Problem Ahttp://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4100题意:以连通块中元素个数为权值,建立线段树,维护三个变量,分别是cnt(这样的连通块的数量),sum(连通块的总的点数),pfh(各连通块之间点数的平方和)(注意不是和的平方)cnt代表连通块数量,tot_ret代表当前状态下的图,在不增长连...
原创
2019-05-09 00:51:39 ·
657 阅读 ·
0 评论