摘要: "http://www.51nod.com/onlineJudge/questionCode.html !problemId=1363" $$ \begin{aligned} &\sum_{i=1}^n\frac{in}{(i,j)}\\ =&n\sum_{d|n}\sum_{i=1}^{\frac 阅读全文
posted @ 2017-04-25 17:33 abclzr 阅读(273) 评论(0) 推荐(0) 编辑
摘要: "http://hihocoder.com/problemset/problem/1513" h[j][i]记录第j个学科排名小于等于i的状态,bitset压位就可以了。 c++ include include include include using namespace std; const i 阅读全文
posted @ 2017-04-25 11:26 abclzr 阅读(242) 评论(0) 推荐(0) 编辑
摘要: "http://uoj.ac/problem/205" 好神的题啊。 dp[i][j]表示以i为根的子树调整成长度j需要的最小代价。 首先要观察到dp值是一个下凸壳。 因为从儿子合并到父亲时要把所有儿子的凸壳相加,得到的还是一个凸壳。 父亲要把它连向它父亲的边的影响加入时,设这条边长度为len,则相 阅读全文
posted @ 2017-04-25 07:54 abclzr 阅读(685) 评论(0) 推荐(0) 编辑