
差分序列
文章平均质量分 83
zhb1997
OIer
展开
-
vijos1782借教室
描述在大学期间,经常需要租借教室。大到院系举办活动,小到学习小组自习讨论,都需要向学校申请借教室。教室的大小功能不同,借教室人的身份不同,借教室的手续也不一样。面对海量租借教室的信息,我们自然希望编程解决这个问题。我们需要处理接下来n天的借教室信息,其中第i天学校有ri个教室可供租借。共有m份订单,每份订单用三个正整数描述,分别为dj,sj,tj,表示某租借者需要从第sj天到第tj天租原创 2014-06-11 23:14:34 · 623 阅读 · 0 评论 -
bzoj1651[Usaco2006 Feb]Stall Reservations 专用牛棚
DescriptionOh those picky N (1 <= N <= 50,000) cows! They are so picky that each one will only be milked over some precise time interval A..B (1 <= A <= B <= 1,000,000), which includes both time原创 2014-06-04 23:15:17 · 730 阅读 · 0 评论 -
bzoj1679[Usaco2005 Jan]Moo Volume 牛的呼声
DescriptionFarmer John has received a noise complaint from his neighbor, Farmer Bob, stating that his cows are making too much noise. FJ's N cows (1 <= N <= 10,000) all graze at various location原创 2014-06-15 23:43:58 · 998 阅读 · 0 评论 -
bzoj1676[Usaco2005 Feb]Feed Accounting 饲料计算
DescriptionFarmer John is trying to figure out when his last shipment of feed arrived. Starting with an empty grain bin, he ordered and received F1 (1 <= F1 <= 1,000,000) kilograms of feed. Regr原创 2014-06-16 00:01:30 · 1580 阅读 · 0 评论 -
bzoj1635 [Usaco2007 Jan]Tallest Cow 最高的牛
DescriptionFJ's N (1 <= N <= 10,000) cows conveniently indexed 1..N are standing in a line. Each cow has a positive integer height (which is a bit of secret). You are told only the height H (1 <原创 2014-07-29 13:39:49 · 804 阅读 · 0 评论 -
bzoj1637 [Usaco2007 Mar]Balanced Lineup
DescriptionFarmer John 决定给他的奶牛们照一张合影,他让 N (1 ≤ N ≤ 50,000) 头奶牛站成一条直线,每头牛都有它的坐标(范围: 0..1,000,000,000)和种族(0或1)。 一直以来 Farmer John 总是喜欢做一些非凡的事,当然这次照相也不例外。他只给一部分牛照相,并且这一组牛的阵容必须是“平衡的”。平衡的阵容,指的是在一组牛中,种族0原创 2014-07-29 23:20:56 · 515 阅读 · 0 评论