20201025 day45 模拟(十七)

1 A Tree worker

problem

给定一个(n)个点的树,要求删除一条路径之后剩下的连通块中大小(ge K)的数量最大。

solution

code

2 Make the clock Go

problem

给定两个(n)个数的数列(a_i,b_i),每次选择一个区间([l,r]),进行操作:(forall jin[l,r],a_j=(a_j+1)operatorname{mod} 4)
询问多少次能让(a)变成(b)

solution

code

3 Walking in the 2D

problem

无限大的平面中,每次等概率上下左右走,(n)步后期望走过多少个不同的点。

solution

code

4 Forget the Chocolate

problem

solution

code

原文地址:https://www.cnblogs.com/liuziwen0224/p/20201025day25-001.html