
思路
文章平均质量分 80
OtterVV
这个作者很懒,什么都没留下…
展开
-
KMP CSU2056 思路
CSU20562056: a simple gameSubmit Page Summary Time Limit: 1 Sec Memory Limit: 128 Mb Submitted: 413 Solved: 74 Description这一天,小A和小B在玩一个游戏,他俩每人都有一个整数,然后两人轮流对他们的整数进行操作,每次在下列...原创 2018-08-12 19:23:06 · 246 阅读 · 0 评论 -
ZOJ4029 预处理&二分&思路
Now Loading!!! ZOJ - 4029 题目大意:对于每次问询求那个公式的结果,最后输出每次问询*第几次的和。记得之前组队训练时遇到过一次,当时同队的学姐提出了log的预处理,我想到了log的范围只有1~30,但是没再想下去。顺着上面的想法,我们就会想到预处理出a数组在每个log情况下的前缀和。对于每次问询,处理p的每个次方段里的a数组,每段里分母一样,...原创 2019-01-21 20:46:47 · 270 阅读 · 0 评论 -
FFT&容斥原理 HDU4609
3-idiotsTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8695 Accepted Submission(s): 3010 Problem DescriptionKing OMeGa catched thre...原创 2019-01-24 21:33:54 · 305 阅读 · 0 评论 -
贪心&公式推导 思路
MoneySubmit Page Time Limit: 1 Sec Memory Limit: 128 Mb Submitted: 11 Solved: 8 DescriptionZJ开公司,年年荣登315晚会。315当天,一大帮员工来ZJ公司讨工资。(显然又欠工资了囧)。员工们围成一个圈,把ZJ围在中间,打算用暴力手段讨取工资。机智如...原创 2018-12-09 15:18:55 · 516 阅读 · 2 评论 -
UVALive 7261 A Xiongnu's Land 二分&思路
Wei Qing (died 106 BC) was a military general of the Western Han dynasty whose campaigns against the Xiongnu earned him great acclaim. He was a relative of Emperor Wu because he was the younger half-b...原创 2018-10-24 16:32:33 · 264 阅读 · 0 评论 -
ACM-ICPC 2018 南京赛区网络预赛 The_writing_on_the_wall 单调栈 思路
The writing on the wall 2000ms 262144KFeeling hungry, a cute hamster decides to order some take-away food (like fried chicken for only 30 Yuan).However, his owner CXY thinks that take-away food...原创 2018-09-04 19:35:53 · 271 阅读 · 0 评论 -
二分 POJ3111 K Best 最大化平均值
Demy has n jewels. Each of her jewels has some value vi and weight wi.Since her husband John got broke after recent financial crises, Demy has decided to sell some jewels. She has decided that she w...原创 2018-02-02 00:42:12 · 248 阅读 · 0 评论 -
树状数组 POJ2352 思路
StarsTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 54300 Accepted: 23361 DescriptionAstronomers often examine star maps where stars are represented by points on a ...原创 2018-05-02 17:36:41 · 178 阅读 · 0 评论 -
Codeforces_1140E_有想法的分类讨论DP
Codeforces 1140E——有想法的分类讨论DP题目大意给一个长度为n的序列,其中-1的位置可被任意[1,k]的整数代替。要求是序列中的任意奇数长度子串不是回文串。问有多少种填充方案(不同序列)。思路首先转换题意,序列中的任意奇数长度子串不是回文串,可通过 a[i]≠a[i+2]a[i] \neq a[i+2]a[i]̸=a[i+2] 条件满足,因为只要长度为3不满足,即可没...原创 2019-07-26 17:19:00 · 288 阅读 · 0 评论