摘要:
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2067 问题1:贪心考虑,应该是每个点的儿子尽量两两配对,如果剩一个就和自己合并向上,所以 ans = 1 + ∑(1<= i <= n ) (deg[i] - 1)/2 问题2:二分最长线段的 阅读全文
摘要:
题目:https://www.luogu.org/problemnew/show/P1084 5个月前曾经写过一次,某个上学日的深夜,精疲力竭后只有区区10分,从此没管... #include<iostream> #include<cstdio> #include<cstring> #include 阅读全文
该文被密码保护。 阅读全文