bzoj1688 [Usaco2005 Open]Disease Manangement 疾病管理
摘要:DescriptionAlas! A set of D (1 #includeusing namespace std;int n,m,k,final,ans;int mul[20];int a[1010];int f[1b?a:b;}inline int read(){ int x=0,f=1...
阅读全文
posted @
2014-07-31 23:15
zhber
阅读(198)
推荐(0)
bzoj1653 [Usaco2006 Feb]Backward Digit Sums
摘要:DescriptionFJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 #includeusing namespace std;int n,m;int a[20],wrk[2...
阅读全文
posted @
2014-07-31 22:23
zhber
阅读(167)
推荐(0)
bzoj1653 [Usaco2006 Feb]Backward Digit Sums
摘要:DescriptionFJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 int n,a[2010];int f[2010][2010];inline int max(int ...
阅读全文
posted @
2014-07-31 21:51
zhber
阅读(192)
推荐(0)
bzoj1650 [Usaco2006 Dec]River Hopscotch 跳石子
摘要:DescriptionEvery year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. T...
阅读全文
posted @
2014-07-31 21:35
zhber
阅读(162)
推荐(0)
bzoj1649 [Usaco2006 Dec]Cow Roller Coaster
摘要:DescriptionThe cows are building a roller coaster! They want your help to design as fun a roller coaster as possible, while keeping to the budget. The...
阅读全文
posted @
2014-07-31 21:16
zhber
阅读(186)
推荐(0)
bzoj1050 [HAOI2006]旅行comf
摘要:Description给你一个无向图,N(N#include#includeusing namespace std;struct node{ int from,to; int path;}data[5001];int fa[501]; bool cmp(const node &a,con...
阅读全文
posted @
2014-07-31 21:10
zhber
阅读(178)
推荐(0)
bzoj1648 [Usaco2006 Dec]Cow Picnic 奶牛野餐
摘要:DescriptionThe cows are having a picnic! Each of Farmer John's K (1 2The pastures are laid out as shown above, with cows in pastures 2 and 3.Sample Ou...
阅读全文
posted @
2014-07-30 23:26
zhber
阅读(199)
推荐(0)
bzoj1645 [Usaco2007 Open]City Horizon 城市地平线
摘要:DescriptionFarmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouet...
阅读全文
posted @
2014-07-30 22:54
zhber
阅读(230)
推荐(0)
bzoj1644 [Usaco2007 Oct]Obstacle Course 障碍训练课
摘要:Description考虑一个 N x N (1 #includeconst int mx[4]={1,0,-1,0};const int my[4]={0,1,0,-1};int n,sx,sy,ex,ey,ans=100000,t,w;int dist[4][110][110];int q[10...
阅读全文
posted @
2014-07-30 21:22
zhber
阅读(273)
推荐(0)
bzoj1640 [Usaco2007 Nov]Best Cow Line 队列变换
摘要:DescriptionFJ打算带着他可爱的N (1 ≤ N ≤ 2,000)头奶牛去参加”年度最佳老农”的比赛.在比赛中,每个农夫把他的奶牛排成一列,然后准备经过评委检验. 比赛中简单地将奶牛的名字缩写为其头字母(the initial letter of every cow),举个例子,FJ带了B...
阅读全文
posted @
2014-07-30 00:03
zhber
阅读(408)
推荐(0)
bzoj1639 [Usaco2007 Mar]Monthly Expense 月度开支
摘要:DescriptionFarmer John是一个令人惊讶的会计学天才,他已经明白了他可能会花光他的钱,这些钱本来是要维持农场每个月的正常运转的。他已经计算了他以后N(1int n,m,l,r,ans;int a[100010];int s[100010];inline int max(int a,...
阅读全文
posted @
2014-07-29 23:43
zhber
阅读(237)
推荐(0)
bzoj1637 [Usaco2007 Mar]Balanced Lineup
摘要:DescriptionFarmer John 决定给他的奶牛们照一张合影,他让 N (1 ≤ N ≤ 50,000) 头奶牛站成一条直线,每头牛都有它的坐标(范围: 0..1,000,000,000)和种族(0或1)。 一直以来 Farmer John 总是喜欢做一些非凡的事,当然这次照相也不例外。...
阅读全文
posted @
2014-07-29 23:20
zhber
阅读(194)
推荐(0)
bzoj1641 [Usaco2007 Nov]Cow Hurdles 奶牛跨栏
摘要:DescriptionFarmer John 想让她的奶牛准备郡级跳跃比赛,贝茜和她的伙伴们正在练习跨栏。她们很累,所以她们想消耗最少的能量来跨栏。 显然,对于一头奶牛跳过几个矮栏是很容易的,但是高栏却很难。于是,奶牛们总是关心路径上最高的栏的高度。 奶牛的训练场中有 N (1 ≤ N ≤ 300)...
阅读全文
posted @
2014-07-29 18:03
zhber
阅读(163)
推荐(0)
bzoj1635 [Usaco2007 Jan]Tallest Cow 最高的牛
摘要:DescriptionFJ's N (1 = h[a]Input* Line 1: Four space-separated integers: N, I, H and R* Lines 2..R+1: Two distinct space-separated integers A and B (1...
阅读全文
posted @
2014-07-29 13:39
zhber
阅读(173)
推荐(0)
bzoj1638 [Usaco2007 Mar]Cow Traffic 奶牛交通
摘要:Description农场中,由于奶牛数量的迅速增长,通往奶牛宿舍的道路也出现了严重的交通拥堵问题.FJ打算找出最忙碌的道路来重点整治. 这个牧区包括一个由M (1 ≤ M ≤ 50,000)条单行道路(有向)组成的网络,以及 N (1 ≤ N ≤ 5,000)个交叉路口(编号为1..N),每一条道...
阅读全文
posted @
2014-07-29 12:28
zhber
阅读(231)
推荐(0)
bzoj3407 [Usaco2009 Oct]Bessie's Weight Problem 贝茜的体重问题
摘要:Description贝茜像她的诸多姊妹一样,因为从约翰的草地吃了太多美味的草而长出了太多的赘肉.所以约翰将她置于一个及其严格的节食计划之中.她每天不能吃多过H(5≤日≤45000)公斤的干草.贝茜只能吃一整捆干草;当她开始吃一捆干草的之后就再也停不下来了.她有一个完整的N(1≤N≤500)捆可以给...
阅读全文
posted @
2014-07-28 23:39
zhber
阅读(288)
推荐(0)
bzoj1631 [Usaco2007 Feb]Cow Party
摘要:Description农场有N(1≤N≤1000)个牛棚,每个牛棚都有1只奶牛要参加在X牛棚举行的奶牛派对.共有M(1≤M≤100000)条单向路连接着牛棚,第i条踣需要Ti的时间来通过.牛们都很懒,所以不管是前去X牛棚参加派对还是返回住所,她们都采用了用时最少的路线.那么,用时最多的奶牛需要多少时...
阅读全文
posted @
2014-07-28 23:21
zhber
阅读(212)
推荐(0)
bzoj1632 [Usaco2007 Feb]Lilypad Pond
摘要:DescriptionFarmer John 建造了一个美丽的池塘,用于让他的牛们审美和锻炼。这个长方形的池子被分割成了 M 行和 N 列( 1 ≤ M ≤ 30 ; 1 ≤ N ≤ 30 ) 正方形格子的 。某些格子上有惊人的坚固的莲花,还有一些岩石,其余的只是美丽,纯净,湛蓝的水。 贝茜正在练习...
阅读全文
posted @
2014-07-28 22:30
zhber
阅读(190)
推荐(0)
bzoj1630 [Usaco2007 Demo]Ant Counting
摘要:DescriptionBessie was poking around the ant hill one day watching the ants march to and fro while gathering food. She realized that many of the ants w...
阅读全文
posted @
2014-07-27 22:54
zhber
阅读(181)
推荐(0)
bzoj1623 [Usaco2008 Open]Cow Cars 奶牛飞车
摘要:Description编号为1到N的N只奶牛正各自驾着车打算在牛德比亚的高速公路上飞驰.高速公路有M(1≤M≤N)条车道.奶牛i有一个自己的车速上限Si(l≤Si≤1,000,000).在经历过糟糕的驾驶事故之后,奶牛们变得十分小心,避免碰撞的发生.每条车道上,如果某一只奶牛i的前面有南只奶牛驾车行...
阅读全文
posted @
2014-07-27 21:58
zhber
阅读(151)
推荐(0)
bzoj3668 [Noi2014]起床困难综合症
摘要:Description21 世纪,许多人得了一种奇怪的病:起床困难综合症,其临床表现为:起床难,起床后精神不佳。作为一名青春阳光好少年,atm 一直坚持与起床困难综合症作斗争。通过研究相关文献,他找到了该病的发病原因:在深邃的太平洋海底中,出现了一条名为 drd 的巨龙,它掌握着睡眠之精髓,能随意延...
阅读全文
posted @
2014-07-27 21:29
zhber
阅读(184)
推荐(0)
bzoj2100 [Usaco2010 Dec]Apple Delivery
摘要:DescriptionBessie has two crisp red apples to deliver to two of her friends in the herd. Of course, she travels the C (1 6-> 7 -> 4* -> 3 -> 2 -> 1* ...
阅读全文
posted @
2014-07-27 16:45
zhber
阅读(160)
推荐(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...
阅读全文
posted @
2014-07-26 22:30
zhber
阅读(162)
推荐(0)
bzoj1674 [Usaco2005]Part Acquisition
摘要:DescriptionThe cows have been sent on a mission through space to acquire a new milking machine for their barn. They are flying through a cluster of st...
阅读全文
posted @
2014-07-25 23:08
zhber
阅读(232)
推荐(0)
bzoj1684 [Usaco2005 Oct]Close Encounter
摘要:DescriptionLacking even a fifth grade education, the cows are having trouble with a fraction problem from their textbook. Please help them. The proble...
阅读全文
posted @
2014-07-25 22:45
zhber
阅读(314)
推荐(0)
bzoj1628 [Usaco2007 Demo]City skyline
摘要:DescriptionThe best part of the day for Farmer John's cows is when the sun sets. They can see the skyline of the distant city. Bessie wonders how many...
阅读全文
posted @
2014-07-25 22:10
zhber
阅读(199)
推荐(0)
bzoj1622 [Usaco2008 Open]Word Power 名字的能量
摘要:Description约翰想要计算他那N(1≤N≤1000)只奶牛的名字的能量.每只奶牛的名字由不超过1000个字待构成,没有一个名字是空字体串,约翰有一张“能量字符串表”,上面有M(1≤M≤100)个代表能量的字符串.每个字符串由不超过30个字体构成,同样不存在空字符串.一个奶牛的名字蕴含多少个能...
阅读全文
posted @
2014-07-25 21:17
zhber
阅读(445)
推荐(0)
bzoj1968 [Ahoi2005]COMMON 约数研究
摘要:DescriptionInput只有一行一个整数 N(0 int n,s;int main(){ scanf("%d",&n); for (int i=1;i<=n;i++) s+=n/i; printf("%d",s);}
阅读全文
posted @
2014-07-25 16:45
zhber
阅读(137)
推荐(0)
bzoj1643 [Usaco2007 Oct]Bessie's Secret Pasture 贝茜的秘密草坪
摘要:Description农夫约翰已经从他的牧场中取得了数不清块数的正方形草皮,草皮的边长总是整数(有时农夫约翰割草皮的刀法不合适,甚至切出了边长为0的正方形草皮),他已经把草皮放在了一个奶牛贝茜已经知道的地方。 贝茜总是希望把美味的草皮放到她的秘密庄园里,她决定从这些草皮中取出恰好4块搬到她的秘密庄园...
阅读全文
posted @
2014-07-24 23:06
zhber
阅读(220)
推荐(0)
bzoj1629 [Usaco2007 Demo]Cow Acrobats
摘要:DescriptionFarmer John's N (1 #includeusing namespace std;struct cow{ int w,s;}c[50010];int n,ans=-10000000,tot;inline int read(){ int x=0,f=1;char...
阅读全文
posted @
2014-07-24 22:52
zhber
阅读(139)
推荐(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 #...
阅读全文
posted @
2014-07-24 21:42
zhber
阅读(159)
推荐(0)
bzoj1615 [Usaco2008 Mar]The Loathesome Hay Baler麻烦的干草打包机
摘要:DescriptionFarmer John新买的干草打包机的内部结构大概算世界上最混乱的了,它不象普通的机器一样有明确的内部传动装置,而是,N (2 struct point{ int x,y,r; double v;}p[10001];int n,cnt,t,w=1,start,end;int ...
阅读全文
posted @
2014-07-24 21:29
zhber
阅读(339)
推荐(0)
bzoj3402 [Usaco2009 Open]Hide and Seek 捉迷藏
摘要:Description贝茜在和约翰玩一个“捉迷藏”的游戏.她正要找出所有适合她躲藏的安全牛棚.一共有N(2≤N≤20000)个牛棚,被编为1到N号.她知道约翰(捉牛者)从牛棚1出发.所有的牛棚由M(1≤M≤50000)条双向路连接,每条双向路连接两个不同的牛棚.所有的牛棚都是相通的.贝茜认为同牛棚1...
阅读全文
posted @
2014-07-24 20:26
zhber
阅读(220)
推荐(0)
bzoj1671 [Usaco2005 Dec]Knights of Ni 骑士
摘要:DescriptionBessie is in Camelot and has encountered a sticky situation: she needs to pass through the forest that is guarded by the Knights of Ni. In ...
阅读全文
posted @
2014-07-22 23:29
zhber
阅读(362)
推荐(0)
bzoj1088 [SCOI2005]扫雷Mine
摘要:Description相信大家都玩过扫雷的游戏。那是在一个n*m的矩阵里面有一些雷,要你根据一些信息找出雷来。万圣节到了,“余”人国流行起了一种简单的扫雷游戏,这个游戏规则和扫雷一样,如果某个格子没有雷,那么它里面的数字表示和它8连通的格子里面雷的数目。现在棋盘是n×2的,第一列里面某些格子是雷,而...
阅读全文
posted @
2014-07-22 22:25
zhber
阅读(171)
推荐(0)
bzoj1655 [Usaco2006 Jan] Dollar Dayz 奶牛商店
摘要:DescriptionFarmer John goes to Dollar Days at The Cow Store and discovers an unlimited number of tools on sale. During his first visit, the tools are ...
阅读全文
posted @
2014-07-22 21:04
zhber
阅读(265)
推荐(0)
bzoj3479 [Usaco2014 Mar]Watering the Fields
摘要:DescriptionDue to a lack of rain, Farmer John wants to build an irrigation system to send water between his N fields (1 #includeusing namespace std;st...
阅读全文
posted @
2014-07-21 22:35
zhber
阅读(163)
推荐(0)
bzoj1690 [Usaco2007 Dec]奶牛的旅行
摘要:Description作为对奶牛们辛勤工作的回报,Farmer John决定带她们去附近的大城市玩一天。旅行的前夜,奶牛们在兴奋地讨论如何最好地享受这难得的闲暇。 很幸运地,奶牛们找到了一张详细的城市地图,上面标注了城市中所有L(2 L2_i),以及她们从道路的一头走到另一头所需要的时间T_i(1...
阅读全文
posted @
2014-07-21 21:52
zhber
阅读(200)
推荐(0)
bzoj1657 [Usaco2006 Mar]Mooo 奶牛的歌声
摘要:DescriptionFarmer John's N (1 #include#define N 50001inline int max(int a,int b){return a>b?a:b;}inline int read(){ int x=0,f=1;char ch=getchar(); ...
阅读全文
posted @
2014-07-20 23:15
zhber
阅读(199)
推荐(0)
bzoj1750 [Usaco2005 qua]Apple Catching
摘要:DescriptionIt is a little known fact that cows love apples. Farmer John has two apple trees (which are conveniently numbered 1 and 2) in his field, ea...
阅读全文
posted @
2014-07-20 22:50
zhber
阅读(246)
推荐(0)
【czy系列赛】czy的后宫6 && bzoj1044 [HAOI2008]木棍分割
摘要:题目描述众所周知的是丧尸czy有很多妹子(虽然很多但是质量不容乐观QAQ),今天czy把n个妹子排成一行来检阅。但是czy的妹子的质量实在……所以czy看不下去了。检阅了第i个妹子会增加czy a[i]的肾虚值,他打算在检阅过程中最多休息m次(一开始检阅算0次休息,就是说czy最多可以检阅m+1次)...
阅读全文
posted @
2014-07-20 21:57
zhber
阅读(291)
推荐(0)
【czy系列赛】czy的后宫4 && bzoj1925 [Sdoi2010]地精部落
摘要:【问题描述】czy有很多妹子,妹子虽然数量很多,但是质量不容乐观,她们的美丽值全部为负数(喜闻乐见)。czy每天都要带N个妹子到机房,她们都有一个独一无二的美丽值,美丽值为-1到-N之间的整数。他想要把这些妹子排成一个波动序列,这样相对“漂亮”(美丽值的绝对值较小)的妹子可以与她旁边的两个美丽值的绝...
阅读全文
posted @
2014-07-20 21:52
zhber
阅读(879)
推荐(0)
bzoj1053 [HAOI2007]反素数ant
摘要:Description对于任何正整数x,其约数的个数记作g(x)。例如g(1)=1、g(6)=4。 如果某个正整数x满足:g(x)>g(i) 0 g(i),所以如果有g(i)=g(j)且ig(i)不满足至于一个数的约数个数,把它分解质因数,假设是p1^q1 * p2^q2 * p3^q3……*pi...
阅读全文
posted @
2014-07-19 15:10
zhber
阅读(887)
推荐(2)
bzoj1821 [JSOI2010]Group 部落划分 Group
摘要:Description聪聪研究发现,荒岛野人总是过着群居的生活,但是,并不是整个荒岛上的所有野人都属于同一个部落,野人们总是拉帮结派形成属于自己的部落,不同的部落之间则经常发生争斗。只是,这一切都成为谜团了——聪聪根本就不知道部落究竟是如何分布的。 不过好消息是,聪聪得到了一份荒岛的地图。地图上标注...
阅读全文
posted @
2014-07-18 22:57
zhber
阅读(266)
推荐(0)
bzoj2150 部落战争
摘要:Descriptionlanzerb的部落在A国的上部,他们不满天寒地冻的环境,于是准备向A国的下部征战来获得更大的领土。 A国是一个M*N的矩阵,其中某些地方是城镇,某些地方是高山深涧无人居住。lanzerb把自己的部落分成若干支军队,他们约定: 1. 每支军队可以从任意一个城镇出发,并只能从上往...
阅读全文
posted @
2014-07-18 22:18
zhber
阅读(227)
推荐(0)
cf448D Multiplication Table
摘要:D. Multiplication Tabletime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBizon the Champion isn't j...
阅读全文
posted @
2014-07-18 21:05
zhber
阅读(284)
推荐(0)
bzoj1044[HAOI2008]木棍分割
摘要:Description有n根木棍, 第i根木棍的长度为Li,n根木棍依次连结了一起, 总共有n-1个连接处. 现在允许你最多砍断m个连接处, 砍完后n根木棍被分成了很多段,要求满足总长度最大的一段长度最小, 并且输出有多少种砍的方法使得总长度最大的一段长度最小. 并将结果mod 10007。。。In...
阅读全文
posted @
2014-07-18 17:23
zhber
阅读(215)
推荐(0)
cf448B Suffix Structures
摘要:B. Suffix Structurestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBizon the Champion isn't just...
阅读全文
posted @
2014-07-18 00:59
zhber
阅读(224)
推荐(0)
cf448A Rewards
摘要:A. Rewardstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBizon the Champion is called the Champi...
阅读全文
posted @
2014-07-18 00:57
zhber
阅读(150)
推荐(0)
福建省队集训被虐记——DAY4
摘要:啊啊啊啊啊啊第四天考的是我最不擅长的图论……整个人都斯巴达了//另外不得不吐槽下午的上课讲的都是网络流……难道是出题人觉得图论里除了网络流以外的其他算法都没有人权图样图森破?愚蠢的算法(clumsy)时限:1s输入文件:clumsy.in输出文件:clumsy.out问题描述 对于一个1~n的排列{...
阅读全文
posted @
2014-07-16 22:07
zhber
阅读(244)
推荐(0)
福建省队集训被虐记——DAY3
摘要:昨天没写……今天补上吧一如既往的跪了棋盘【问题描述】给出一个N*M的方格棋盘,每个格子里有一盏灯和一个开关,开始的时候,所有的灯都是关着的。用(x, y)表示第x行,y列的格子。(x, y)的开关可以改变(x, y)中灯的状态,同时也可以改变满足|x’-x|=2,|y’-y|=1或者|x’-x|=1...
阅读全文
posted @
2014-07-15 22:55
zhber
阅读(240)
推荐(0)
bzoj1751 [Usaco2005 qua]Lake Counting
摘要:1751: [Usaco2005 qua]Lake CountingTime Limit:5 SecMemory Limit:64 MBSubmit:168Solved:130[Submit][Status]DescriptionDue to recent rains, water has pool...
阅读全文
posted @
2014-07-15 11:52
zhber
阅读(165)
推荐(0)
cf446C DZY Loves Fibonacci Numbers
摘要:C. DZY Loves Fibonacci Numberstime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn mathematical te...
阅读全文
posted @
2014-07-14 23:30
zhber
阅读(1435)
推荐(0)
cf446A DZY Loves Sequences
摘要:A. DZY Loves Sequencestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDZY has a sequencea, consis...
阅读全文
posted @
2014-07-14 00:15
zhber
阅读(335)
推荐(0)
福建省队集训被虐记——DAY2
摘要:唉……第二天依然被虐……但是比第一天好一点……我必须负责任的指出:志灿大神出的题比柯黑的不知道靠谱到哪里去了……柯黑出的简直不可做但是被虐的命运是无法改变的……求各位神犇别D我黄巨大真是强啊,不愧是福建省现役最强!连A两题之后第三题写了个暴力随机点+最小生成树的多跑了几次竟然各种乱A……还把std给...
阅读全文
posted @
2014-07-13 20:41
zhber
阅读(208)
推荐(0)
bzoj1752 [Usaco2005 qua]Til the Cows Come Home
摘要:DescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning ...
阅读全文
posted @
2014-07-12 23:58
zhber
阅读(244)
推荐(0)
福建省队集训被虐记——DAY1
摘要:今天算是省冬的第一天……早上柯黑出题,说是“信心欢乐赛”,其实是“使你失去信心、不再欢乐的比赛”顺便orz一下来看这篇文章的各路神犇……求轻虐水题(py.cpp/c/pas)【题目描述】小呆同学非常的懒,做数学题的时候喜欢用Python 做计算器,写一个脚本,用Python运行一下,把答案写到书上。...
阅读全文
posted @
2014-07-12 23:31
zhber
阅读(292)
推荐(0)
bzoj1755 [Usaco2005 qua]Bank Interest
摘要:DescriptionFarmer John made a profit last year! He would like to invest it well but wonders how much money he will make. He knows the interest rate R ...
阅读全文
posted @
2014-07-12 21:10
zhber
阅读(171)
推荐(0)
bzoj1754 [Usaco2005 qua]Bull Math
摘要:DescriptionBulls are so much better at math than the cows. They can multiply huge integers together and get perfectly precise answers ... or so they s...
阅读全文
posted @
2014-07-12 21:04
zhber
阅读(170)
推荐(0)
bzoj1753 [Usaco2005 qua]Who's in the Middle
摘要:DescriptionFJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median' cow gives: half of the cows give as muc...
阅读全文
posted @
2014-07-12 20:48
zhber
阅读(177)
推荐(0)
wikioi1369 xth 砍树
摘要:题目描述 Description 题目描述 Description 在一个凉爽的夏夜,xth 和 rabbit 来到花园里砍树。为啥米要砍树呢?是这样滴, 小菜儿的儿子窄森要出生了。Xth这个做伯伯的自然要做点什么。于是他决定带着 rabbit 去收集一些木材,给窄森做一个婴儿车……(xth 早就梦
阅读全文
posted @
2014-07-12 11:51
zhber
阅读(223)
推荐(0)
wikioi1191 数轴染色
摘要:题目描述 Description 题目描述 Description 在一条数轴上有N个点,分别是1~N。一开始所有的点都被染成黑色。接着 我们进行M次操作,第i次操作将[Li,Ri]这些点染成白色。请输出每个操作执行后 剩余黑色点的个数。 输入描述 Input Description 输入描述 In
阅读全文
posted @
2014-07-11 23:38
zhber
阅读(234)
推荐(0)
bzoj1189 [HNOI2007]紧急疏散evacuate
摘要:Description发生了火警,所有人员需要紧急疏散!假设每个房间是一个N M的矩形区域。每个格子如果是'.',那么表示这是一块空地;如果是'X',那么表示这是一面墙,如果是'D',那么表示这是一扇门,人们可以从这儿撤出房间。已知门一定在房间的边界上,并且边界上不会有空地。最初,每块空地上都有一个...
阅读全文
posted @
2014-07-11 23:02
zhber
阅读(325)
推荐(0)
bzoj1379 [Baltic2001]Postman
摘要:Description邮递员每天给N个村子的人送信,每个村子可能在某个十字路口上,或一条路的中央. 村子里的人都希望早点收到信,因此与邮递员达成一个协议:每个村子都有一个期望值Wi,如果这个村子是邮递员经过的第K个不同的村子,那么如果Kint n,m;int main(){ scanf("%d%d"...
阅读全文
posted @
2014-07-10 10:24
zhber
阅读(332)
推荐(0)
bzoj1116 [POI2008]CLO
摘要:DescriptionByteotia城市有n个 towns m条双向roads. 每条 road 连接 两个不同的 towns ,没有重复的road. 你要把其中一些road变成单向边使得:每个town都有且只有一个入度Input第一行输入n m.1 =n条边存在时存在一组解因为每一条有向边最多贡...
阅读全文
posted @
2014-07-10 10:21
zhber
阅读(283)
推荐(0)
bzoj1734 [Usaco2005 feb]Aggressive cows 愤怒的牛
摘要:DescriptionFarmer John has built a new long barn, with N (2 #includeusing namespace std;inline int read(){ int x=0,f=1;char ch=getchar(); while(...
阅读全文
posted @
2014-07-09 21:16
zhber
阅读(202)
推荐(0)
tyvj1086 Elevator
摘要:背景 Background广东汕头聿怀初中Train#2Problem4描述 Description现有N种箱子,每种箱子高度H_i,数量C_i。现选取若干箱子堆成一列,且第i种箱子不能放在高度超过A_i的地方。试求最大叠放高度。输入格式 InputFormat第一行,一个整数,表示箱子种类N。接下...
阅读全文
posted @
2014-07-08 23:24
zhber
阅读(159)
推荐(0)
2014.7.8模拟赛【聪明的打字员】
摘要:阿兰是某机密部门的打字员,她现在接到一个任务:需要在一天之内输入几百个长度固定为6的密码。当然,她希望输入的过程中敲击键盘的总次数越少越好。不幸的是,出于保密的需要,该部门用于输入密码的键盘是特殊设计的,键盘上没有数字键,而只有以下六个键:Swap0,Swap1,Up,Down,Left,Right...
阅读全文
posted @
2014-07-08 23:00
zhber
阅读(168)
推荐(0)
2014.7.8模拟赛【笨笨当粉刷匠】|bzoj1296 [SCOI]粉刷匠
摘要:笨笨太好玩了,农田荒芜了,彩奖用光了,笨笨只好到处找工作,笨笨找到了一份粉刷匠的工作。笨笨有n条木板需要被粉刷。每条木板被分成m个格子,每个格子要被刷成红色或蓝色。笨笨每次粉刷,只能选择一条木板上一段连续的格子,然后涂上一种颜色,已知每个格子最多只能被粉刷一次。 如果笨笨只能粉刷t次,他最多能正确粉...
阅读全文
posted @
2014-07-08 22:47
zhber
阅读(279)
推荐(0)
2014.7.8模拟赛【笨笨的电话网络】
摘要:多年以后,笨笨长大了,成为了电话线布置师。由于地震使得某市的电话线全部损坏,笨笨是负责接到震中市的负责人。该市周围分布着N(1≤N≤1000)根据1…n顺序编号的废弃的电话线杆,任意两根线杆之间没有电话线连接,一共有p(0≤p≤10000)对电话杆可以拉电话线。其他的由于地震使得无法连接。 第i对电...
阅读全文
posted @
2014-07-08 22:47
zhber
阅读(204)
推荐(0)
2014.7.8模拟赛【词编码】
摘要:一个发送机可以通过一条隧道发送一些以二进制代码组成的单词。在其尽头的接收机可以使用特殊技术恢复到最初的单词。每个单词最初都由0和1组成。所有的单词最-初长度都为n(4≤N ≤l000)。当穿过隧道之后单词可能发生以下几种情况之一: (1)任意(一个)0被1取代 (2)任意(一个)符号被删除 (3)一...
阅读全文
posted @
2014-07-08 22:29
zhber
阅读(153)
推荐(0)
bzoj1854 [Scoi2010]游戏
摘要:Descriptionlxhgww最近迷上了一款游戏,在游戏里,他拥有很多的装备,每种装备都有2个属性,这些属性的值用[1,10000]之间的数表示。当他使用某种装备时,他只能使用该装备的某一个属性。并且每种装备最多只能使用一次。 游戏进行到最后,lxhgww遇到了终极boss,这个终极boss很奇...
阅读全文
posted @
2014-07-08 21:34
zhber
阅读(207)
推荐(0)
2014.7.7 模拟赛【小K的农场】
摘要:3.小K的农场(farm.pas/cpp/c)【题目描述】 小K在MC里面建立很多很多的农场,总共n个,以至于他自己都忘记了每个农场中种植作物的具体数量了,他只记得一些含糊的信息(共m个),以下列三种形式描述:农场a比农场b至少多种植了c个单位的作物,农场a比农场b至多多种植了c个单位的作物,农场a...
阅读全文
posted @
2014-07-08 18:09
zhber
阅读(167)
推荐(0)
bzoj1911 [Apio2010]特别行动队
摘要:DescriptionInputOutputSample Input 4 -1 10 -20 2 2 3 4 Sample Output9HINT很容易想到方程是f[i]=max(f[j]+a*(s[i]-s[j])^2+b*(s[i]-s[j])+c),(0f[k] + a*(s[i]-s[k])...
阅读全文
posted @
2014-07-07 23:50
zhber
阅读(168)
推荐(0)
bzoj3396 [Usaco2009 Jan]Total flow 水流
摘要:DescriptionInput第1行输入N,之后N行每行描述一条水管,前两个英文字母表示水管的两端(大小写字母是不一样的),后一个整数表示水管的流量,流量不会超过1000.Output一个整数,表示总流量.Sample Input5A B 3B C 3C D 5D Z 4B Z 6Sample O...
阅读全文
posted @
2014-07-07 20:54
zhber
阅读(161)
推荐(0)
2014.7.7模拟赛【无线通讯网】
摘要:【题目描述】 国防部计划用无线网络连接若干个边防哨所。2种不同的通讯技术用来搭建无线网络;每个边防哨所都要配备无线电收发器;有一些哨所还可以增配卫星电话。任意两个配备了一条卫星电话线路的哨所(两边都拥有卫星电话)均可以通话,无论他们相距多远。而只通过无线电收发器通话的哨所之间的距离不能超过D,这是受...
阅读全文
posted @
2014-07-07 17:05
zhber
阅读(236)
推荐(0)
cf444A DZY Loves Physics
摘要:A. DZY Loves Physicstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDZY loves Physics, and he enj...
阅读全文
posted @
2014-07-07 00:00
zhber
阅读(182)
推荐(0)
cf445B DZY Loves Chemistry
摘要:B. DZY Loves Chemistrytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDZY loves chemistry, and he...
阅读全文
posted @
2014-07-06 23:37
zhber
阅读(346)
推荐(0)
cf445A DZY Loves Chessboard
摘要:A. DZY Loves Chessboardtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDZY loves chessboard, and ...
阅读全文
posted @
2014-07-06 23:28
zhber
阅读(212)
推荐(0)
bzoj3038 上帝造题的七分钟2
摘要:DescriptionXLk觉得《上帝造题的七分钟》不太过瘾,于是有了第二部。"第一分钟,X说,要有数列,于是便给定了一个正整数数列。第二分钟,L说,要能修改,于是便有了对一段数中每个数都开平方(下取整)的操作。第三分钟,k说,要能查询,于是便有了求一段数的和的操作。第四分钟,彩虹喵说,要是noip...
阅读全文
posted @
2014-07-06 22:04
zhber
阅读(192)
推荐(0)
wikioi3052 多米诺
摘要:题目描述 Description 题目描述 Description 一个矩形可以划分成M*N个小正方形,其中有一些小正方形不能使用。一个多米诺骨牌占用两个相邻的小正方形。试问整个区域内最多可以不重叠地放多少个多米诺骨牌且不占用任何一个被标记为无法使用的小正方形。 输入描述 Input Descrip
阅读全文
posted @
2014-07-03 22:07
zhber
阅读(175)
推荐(0)