![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm
fizzking
这个作者很懒,什么都没留下…
展开
-
2019南京网络赛A题 The beautiful values of the palace
2019南京网络赛A题 The beautiful values of the palace题目链接:https://nanti.jisuanke.com/t/41298对于查询(x1,y1)(x2,y2),只需在x1~ x2的范围内查询y1~ y2的sum。考虑用主席树维护sum,则答案为query(rt[x1-1],rt[x2],1,n,y1,y2)计算美丽值先考虑当前坐标(x,y)...原创 2019-09-03 08:54:00 · 152 阅读 · 0 评论 -
2019南京网络赛D题 Robots
题目链接:https://nanti.jisuanke.com/t/41301每个点概率相等的转移到下一个点或停在原地,转移的消耗为当前的时间。先考虑对于每个点到达终点的期望天数,设x为点i的出边数day[i]=∑i→jday[j]+1x+1+day[i]+1x+1=∑i→jday[j]x+1+day[i]x+1+1day[i]=∑i→jday[j]x+x+1x\begin{aligned...原创 2019-09-03 11:32:32 · 172 阅读 · 0 评论 -
2019南京网络赛F题 Greedy Sequence
题目链接:https://nanti.jisuanke.com/t/41303签到题。对于每一个数,假设它的位置为pos,则ans[i]=ans[max{pos-k,pos+k}]+1,计算完ans后更新i。按数字大小转移即可。例如样例中7 23 1 4 6 2 5 7从1至7更新a 1ans 0 1 0 0 0 0 0 p 1 1 1 1 0 0 0 ...原创 2019-09-03 11:57:44 · 95 阅读 · 0 评论