
贪心
文章平均质量分 78
zhb1997
OIer
展开
-
bzoj1821 [JSOI2010]Group 部落划分 Group
Description聪聪研究发现,荒岛野人总是过着群居的生活,但是,并不是整个荒岛上的所有野人都属于同一个部落,野人们总是拉帮结派形成属于自己的部落,不同的部落之间则经常发生争斗。只是,这一切都成为谜团了——聪聪根本就不知道部落究竟是如何分布的。 不过好消息是,聪聪得到了一份荒岛的地图。地图上标注了N个野人居住的地点(可以看作是平面上的坐标)。我们知道,同一个部落的野人总是生活在附近。我原创 2014-07-18 22:57:11 · 547 阅读 · 0 评论 -
bzoj1640 [Usaco2007 Nov]Best Cow Line 队列变换
DescriptionFJ打算带着他可爱的N (1 ≤ N ≤ 2,000)头奶牛去参加”年度最佳老农”的比赛.在比赛中,每个农夫把他的奶牛排成一列,然后准备经过评委检验. 比赛中简单地将奶牛的名字缩写为其头字母(the initial letter of every cow),举个例子,FJ带了Bessie, Sylvia,和Dora,那么就可以缩写为BSD. FJ只需将奶牛的一个序原创 2014-07-30 00:03:23 · 797 阅读 · 0 评论 -
bzoj2014 [Usaco2010 Feb]Chocolate Buying
Description 贝西和其他奶牛们都喜欢巧克力,所以约翰准备买一些送给她们。奶牛巧克力专卖店里有N种巧克力,每种巧克力的数量都是无限多的。每头奶牛只喜欢一种巧克力,调查显示,有Ci头奶牛喜欢第i种巧克力,这种巧克力的售价是P。 约翰手上有B元预算,怎样用这些钱让尽量多的奶牛高兴呢?下面举个例子:假设约翰有50元钱,商店里有S种巧克力:原创 2014-08-06 21:51:05 · 906 阅读 · 0 评论 -
bzoj3709 [PA2014]Bohater
Description在一款电脑游戏中,你需要打败n只怪物(从1到n编号)。为了打败第i只怪物,你需要消耗d[i]点生命值,但怪物死后会掉落血药,使你恢复a[i]点生命值。任何时候你的生命值都不能降到0(或0以下)。请问是否存在一种打怪顺序,使得你可以打完这n只怪物而不死掉Input第一行两个整数n,z(1接下来n行,每行两个整数d[i],a[i](0Outpu原创 2014-09-18 14:09:57 · 838 阅读 · 0 评论 -
cf455A Boredom
A. Boredomtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlex doesn't like boredom. That's why whenever he原创 2014-08-09 20:39:45 · 590 阅读 · 0 评论 -
2014.8.15模拟赛【公主的工作】&&bzoj1046[HAOI2007]上升序列
bzoj题目是这样的Description对于一个给定的S={a1,a2,a3,…,an},若有P={ax1,ax2,ax3,…,axm},满足(x1 Input第一行一个N,表示序列一共有N个元素第二行N个数,为a1,a2,…,an 第三行一个M,表示询问次数。下面接M行每行一个数L,表示要询问长度为L的上升序列。Output对于每个询问,如果对应原创 2014-08-15 23:13:00 · 651 阅读 · 0 评论 -
cf459E Pashmak and Graph
E. Pashmak and Graphtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPashmak's homework is a problem about g原创 2014-08-16 22:54:43 · 539 阅读 · 0 评论 -
bzoj3016 [Usaco2012 Nov]Clumsy Cows
DescriptionBessie the cow is trying to type a balanced string of parentheses into her new laptop, but she is sufficiently clumsy (due to her large hooves) that she keeps mis-typing characters. P原创 2014-09-26 22:50:20 · 760 阅读 · 0 评论 -
bzoj3389 [Usaco2004 Dec]Cleaning Shifts安排值班
Description 一天有T(1≤T≤10^6)个时段.约翰正打算安排他的N(1≤N≤25000)只奶牛来值班,打扫打扫牛棚卫生.每只奶牛都有自己的空闲时间段[Si,Ei](1≤Si≤Ei≤T),只能把空闲的奶牛安排出来值班.而且,每个时间段必需有奶牛在值班. 那么,最少需要动用多少奶牛参与值班呢?如果没有办法安排出合理的方案,就输出-1.Input原创 2014-09-27 17:38:22 · 1175 阅读 · 1 评论 -
cf472B Design Tutorial: Learn from Life
B. Design Tutorial: Learn from Lifetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne way to create a task原创 2014-09-30 20:29:51 · 461 阅读 · 0 评论 -
bzoj3410 [Usaco2009 Dec]Selfish Grazing 自私的食草者
Description 约翰有N(1≤N≤50000)头牛,约翰的草地可以认为是一条直线.每只牛只喜欢在某个特定的范围内吃草.第i头牛喜欢在区间(Si,Ei)吃草,1≤Si 奶牛们都很自私,他们不喜欢和其他奶牛共享自己喜欢吃草的领域,因此约翰要保证任意两头牛都不会共享他们喜欢吃草昀领域.如果奶牛i和奶牛J想要同时吃草,那么要满足:Si>=Ej或者Ei≤Sj.约翰想知道在原创 2014-10-04 15:18:45 · 1022 阅读 · 0 评论 -
cf442B Andrey and Problem
B. Andrey and Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrey needs one more problem to cond原创 2014-06-20 16:25:42 · 1079 阅读 · 0 评论 -
cf442C Artem and Array
C. Artem and Arraytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputArtem has an array of n positive integer原创 2014-06-20 17:34:15 · 853 阅读 · 0 评论 -
2014.8.2模拟赛【打地鼠游戏】
题目描述:伟大的2320学长特别喜欢打地鼠游戏,这个游戏开始后,会在地板上冒出一些地鼠来,你可以用榔头去敲击这些地鼠,每个地鼠被敲击后,将会增加相应的游戏分值。可是,所有地鼠只会在地上出现一段时间(而且消失后再也不会出现),每个地鼠都在0时刻冒出,但停留的时间可能是不同的,而且每个地鼠被敲击后增加的游戏分值也可能是不同。最近2320学长经常玩这个游戏,以至于敲击每个地鼠只要1秒。他在想如何原创 2014-08-02 22:30:36 · 1438 阅读 · 0 评论 -
bzoj1707[Usaco2007 Nov]tanning分配防晒霜
Description奶牛们计划着去海滩上享受日光浴。为了避免皮肤被阳光灼伤,所有C(1 <= C <= 2500)头奶牛必须在出门之前在身上抹防晒霜。第i头奶牛适合的最小和最 大的SPF值分别为minSPF_i和maxSPF_i(1 <= minSPF_i <= 1,000; minSPF_i <= maxSPF_i <= 1,000)。如果某头奶牛涂的防晒霜的SPF值过小,那么阳光仍然原创 2014-06-06 22:42:14 · 807 阅读 · 0 评论 -
bzoj1620 [Usaco2008 Nov]Time Management 时间管理
DescriptionEver the maturing businessman, Farmer John realizes that he must manage his time effectively. He has N jobs conveniently numbered 1..N (1 <= N <= 1,000) to accomplish (like milking th原创 2014-07-24 21:42:06 · 964 阅读 · 0 评论 -
cf437D The Child and Zoo
D. The Child and Zootime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOf course our child likes walking in a原创 2014-06-02 00:18:09 · 1678 阅读 · 0 评论 -
cf437C The Child and Toy
C. The Child and Toytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOn Children's Day, the child got a toy原创 2014-06-01 23:48:03 · 741 阅读 · 0 评论 -
cf437B The Child and Set
B. The Child and Settime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAt the children's day, the child came t原创 2014-06-01 23:41:58 · 779 阅读 · 0 评论 -
bzoj1680[Usaco2005 Mar]Yogurt factory
DescriptionThe cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 <= N <= 10,000) weeks, the price of milk and labor will fluctuate weekly such that it w原创 2014-06-15 23:30:49 · 1067 阅读 · 0 评论 -
bzoj1629 [Usaco2007 Demo]Cow Acrobats
DescriptionFarmer John's N (1 <= N <= 50,000) cows (numbered 1..N) are planning to run away and join the circus. Their hoofed feet prevent them from tightrope walking and swinging from the trapeze原创 2014-07-24 22:52:22 · 420 阅读 · 0 评论 -
cf444A DZY Loves Physics
A. DZY Loves Physicstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDZY loves Physics, and he enjoys calcul原创 2014-07-07 00:00:45 · 649 阅读 · 0 评论 -
bzoj1623 [Usaco2008 Open]Cow Cars 奶牛飞车
Description 编号为1到N的N只奶牛正各自驾着车打算在牛德比亚的高速公路上飞驰.高速公路有M(1≤M≤N)条车道.奶牛i有一个自己的车速上限Si(l≤Si≤1,000,000). 在经历过糟糕的驾驶事故之后,奶牛们变得十分小心,避免碰撞的发生.每条车道上,如果某一只奶牛i的前面有南只奶牛驾车行驶,那奶牛i的速度上限就会下降kD个单位,也就是说,她的速度不会超过Si -原创 2014-07-27 21:58:03 · 668 阅读 · 0 评论 -
bzoj1664 [Usaco2006 Open]County Fair Events 参加节日庆祝
DescriptionFarmer John has returned to the County Fair so he can attend the special events (concerts, rodeos, cooking shows, etc.). He wants to attend as many of the N (1 <= N <= 10,000) special原创 2014-07-26 22:30:51 · 845 阅读 · 0 评论 -
bzoj1734 [Usaco2005 feb]Aggressive cows 愤怒的牛
DescriptionFarmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi <= 1,000,000,000). His C (2 <= C原创 2014-07-09 21:16:33 · 1034 阅读 · 0 评论 -
codecomb 2085【肥得更高】
题目背景自2009年以来,A、B站的历史就已经步入了农业变革的黎明期。在两站的娱乐及音乐区,金坷垃制造业早已得到长足的发展,甚至有些地方还出现了坷垃翻唱的萌芽。新兴肥料人开始走上历史的舞台。他们需要新的意识形态,来为他们所追求的肥料辩护;他们需要新的理念、新的手段,来为金坷垃的生产提供支持。这样,一种崭新的肥料精神就诞生了。肥料复兴,是反对肥料粗制滥造,追求创新的新原创 2014-10-18 23:01:53 · 642 阅读 · 0 评论