
前缀和
文章平均质量分 77
czdb
这个作者很懒,什么都没留下…
展开
-
woj-Soul Artist
Input file: standard inputOutput file: standard output Time limit: 1 secondMemory limit: 512 mebibytesLast year, there were three soul artist in the team Abysswatcher. They were all addicted to原创 2017-04-15 17:29:35 · 379 阅读 · 0 评论 -
csu:1919: 不醉不归
Description小X和他的朋友们在一起开心地喝酒,差不多喝完了,朋友们凑了K元钱让小X去小卖部买酒。因为是老客户,虽然每瓶酒的质量是不同的,不过小X买酒始终只需要1元一瓶。小卖部的酒摆在商品货架上,一共有N个摆着酒的货架,每个货架一开始都摆满了M瓶酒,每瓶酒都有一个自身的质量,可能千差万别。对于每个货架,小X每次只能拿货架最外面的那瓶酒。令小X感到开心的是,现在超市里的这一批原创 2017-05-10 19:19:22 · 405 阅读 · 0 评论 -
Average UVA - 1451
题目链接:https://cn.vjudge.net/problem/UVA-1451题目大意:给出一段序列,找出长度大于L,同时一的个数除以长度最大的起点和终点,比值相同时,长度尽量短,两者相同时,起点尽量小。思路:题目要求的比值就是(sum[j]-sum[i-1])/(j-i+1),看到这个是不是很熟悉,没错这个就是大家很了解的斜率公式,那么题目就变成了,求斜率最大的两点,其中原创 2017-05-09 16:07:57 · 303 阅读 · 0 评论 -
Monitor(二分,二维前缀和板子记录)
Monitortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Luba bought a monitor. Monitor is a rectan原创 2017-09-09 19:26:50 · 398 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第二场)J farm (二维前缀和或者二维树状数组)
链接:https://www.nowcoder.com/acm/contest/140/J 来源:牛客网White Rabbit has a rectangular farmland of n*m. In each of the grid there is a kind of plant. The plant in the j-th column of the i-th row belong...原创 2018-07-24 17:29:12 · 247 阅读 · 0 评论