- 博客(3)
- 收藏
- 关注
原创 2019南京网络赛F题 Greedy Sequence
题目链接:https://nanti.jisuanke.com/t/41303 签到题。 对于每一个数,假设它的位置为pos,则ans[i]=ans[max{pos-k,pos+k}]+1,计算完ans后更新i。按数字大小转移即可。 例如样例中 7 2 3 1 4 6 2 5 7 从1至7更新 a 1 ans 0 1 0 0 0 0 0 p 1 1 1 1 0 0 0 ...
2019-09-03 11:57:44 94
原创 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 168
原创 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 149
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人