
贡献
永夜莫明
菜是原罪
展开
-
滑稽树下你和我(树+贡献)
链接:https://ac.nowcoder.com/acm/contest/992/J?&headNav=acm来源:牛客网题目描述红红和蓝蓝是随机降生在苹果树上的苹果仙灵,现在红线仙想估测他们的CP系数,并决定是否使他们成为一对CP。给出n个结点n-1条边的树,节点编号为1到n,定义distance(i,j)为i与j的树上距离。CP系数是指所有红红和蓝蓝在不同位置i,j的d...原创 2019-07-14 20:48:44 · 351 阅读 · 0 评论 -
New Year Santa Network(树形dp,期望,贡献,好题)
https://cn.vjudge.net/contest/312853#problem/FNew Year is coming in Tree World! In this world, as the name implies, there arencities connected byn - 1roads, and for any two distinct cities there ...原创 2019-08-11 19:09:49 · 209 阅读 · 0 评论 -
Beauty Values(思维找规律+贡献思想)
链接:https://ac.nowcoder.com/acm/contest/888/B来源:牛客网题目描述Gromah and LZR have entered the second level. There is a sequence a1,a2,⋯ ,ana_1, a_2, \cdots, a_na1,a2,⋯,anon the wall.There is a...原创 2019-08-12 23:31:24 · 498 阅读 · 0 评论 -
Colorful String(manacher+序列自动机)
https://nanti.jisuanke.com/t/41389The value of a string s is equal to the number of different letters which appear in this string.Your task is to calculate the total value of all the palindrome su...原创 2019-09-07 23:10:43 · 235 阅读 · 0 评论