标签 - 圆方树

? 解题记录 ? ? LOJ ? ? 圆方树 ?    2018-10-04 13:14:51    728    0    0
地址:https://loj.ac/problem/2587 先来说说我和这道题的故事吧。作为APIO2018最良心得分题,放在T3的位置是真的阴……当打完了T1,T2的暴力后,才发现T3貌似很好拿分,想的是把T1,T2的二档暴力打完后来慢慢拿T3的分。于是就被坑进T1了。T3最后只打了有环和链的、n<=10的。树的档都没看到,血亏。知道了点双树(圆方树)后,这道题就很送分了。对于圆点统计从不同子树中选出两个点的方案,对于方点统计从不同子树选出三个点的方案,加起来就行了。细节比较多,详见注释#include<cstdio> #include<cstring> #i
? 解题记录 ? ? HDU ? ? 圆方树 ? ? 动态规划 ?    2018-06-27 21:53:50    480    0    0
Problem Description Professor Zhang has an undirected graph G with n vertices and m edges. Each vertex is attached with a weight wi. Let Gi be the graph after deleting the i-th vertex from graph G. Professor Zhang wants to find the weight of&nbs