先找相邻差值的最大,第二大,第三大 删去端点会减少一个值, 删去其余点会减少两个值,新增一个值,所以新增和现存的最大的值比较一下取最大即可 ...
分类:
其他好文 时间:
2016-08-06 23:23:29
阅读次数:
127
若 [i, j] 满足, 则 [i, j+1], [i, j+2]...[i,n]均满足 故设当前区间里个数为size, 对于每个 i ,找到刚满足 size == k 的 [i, j], ans += n - j + 1 . i++ 的时候看看需不需要size-- 就可以更新了。 ...
分类:
其他好文 时间:
2016-08-06 23:21:11
阅读次数:
170
题目链接:hdu_5806_NanoApe Loves Sequence Ⅱ 题意: 给你一段数,问你有多少个区间满足第K大的数不小于m 题解: 直接双指针加一下区间就行 1 #include<cstdio> 2 #include<algorithm> 3 #define F(i,a,b) for( ...
分类:
其他好文 时间:
2016-08-06 23:14:32
阅读次数:
160
题目链接:hdu_5805_NanoApe Loves Sequence 题意: 给你n个数,现在要删一个数,删每个数的概率是一样的,现在问你删一个值后的相邻数绝对值最大差的期望是多少,因为担心精度误差,让你答案乘n 题解: 先算出不删数的绝对值最大的差ma并记录位置,如果要删的数不是刚才求出来的位 ...
分类:
其他好文 时间:
2016-08-06 23:11:18
阅读次数:
140
NanoApe Loves Sequence Accepts: 531 Submissions: 2481 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others) Time Limit: 2 ...
分类:
其他好文 时间:
2016-08-06 21:55:40
阅读次数:
226
这次BC终于不像上次一样惨烈 终于A了三题…… 终测ing…… 发一波题解…… A.Price List A题十分无脑 只要把所有数加起来存到sum里 询问的时候大于sum输出1 否则输出0就行了…… 犹豫了好久 怎么会这么简单…… 看群里好多人卡在了%I64d…… B.NanoApe Loves ...
分类:
其他好文 时间:
2016-08-06 21:46:32
阅读次数:
230
NanoApe Loves Sequence Ⅱ
Accepts: 235
Submissions: 396
Time Limit: 4000/2000 MS (Java/Others)
Memory Limit: 262144/131072 K (Java/Others)
Problem Description
NanoApe, the Retired...
分类:
其他好文 时间:
2016-08-06 20:39:04
阅读次数:
146
NanoApe Loves Sequence
Accepts: 505
Submissions: 1646
Time Limit: 2000/1000 MS (Java/Others)
Memory Limit: 262144/131072 K (Java/Others)
Problem Description
NanoApe, the Retired ...
分类:
其他好文 时间:
2016-08-06 20:38:36
阅读次数:
161
Description Mishka is a little polar bear. As known, little bears loves spending their free time playing dice for chocolates. Once in a wonderful sunn ...
分类:
其他好文 时间:
2016-08-06 15:49:11
阅读次数:
97
Description Wind loves pretty dogs very much, and she has n pet dogs. So Jiajia has to feed the dogs every day for Wind. Jiajia loves Wind, but not th ...
分类:
其他好文 时间:
2016-08-03 20:05:16
阅读次数:
296