摘要: Description The cows are having a picnic! Each of Farmer John's K (1 <= K <= 100) cows is grazing in one of N (1 <= N <= 1,000) pastures, conveniently 阅读全文
posted @ 2015-10-19 10:38 HTWX 阅读(116) 评论(0) 推荐(0) 编辑
摘要: XX城堡有n个房间, 每个房间都被装饰成一种颜色( 房间颜色可以重复),记第i个房间的颜色为ci,外面的人无法进入这个城堡,但是可以通过 里面的仆人了解到这些房间的颜色。这些仆人正好有n个,他们要打扫这些 房间。他们有奇怪的规则:第一天第i个仆人打扫第i个房间,第二天第i个仆 人打扫第i + 1个房... 阅读全文
posted @ 2015-10-18 16:00 HTWX 阅读(188) 评论(0) 推荐(0) 编辑
摘要: DescriptionFJ has purchased N (1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #define maxn 201010 #define maxm 2000... 阅读全文
posted @ 2015-10-16 10:03 HTWX 阅读(376) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2015-10-16 09:00 HTWX 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2015-10-15 08:33 HTWX 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Description编号为1到N的N只奶牛正各自驾着车打算在牛德比亚的高速公路上飞驰.高速公路有M(1≤M≤N)条车道.奶牛i有一个自己的车速上限Si(l≤Si≤1,000,000).在经历过糟糕的驾驶事故之后,奶牛们变得十分小心,避免碰撞的发生.每条车道上,如果某一只奶牛i的前面有K只奶牛驾车行... 阅读全文
posted @ 2015-10-13 12:02 HTWX 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2015-10-12 15:07 HTWX 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Description农场中,由于奶牛数量的迅速增长,通往奶牛宿舍的道路也出现了严重的交通拥堵问题.FJ打算找出最忙碌的道路来重点整治. 这个牧区包括一个由M (1 ≤ M ≤ 50,000)条单行道路(有向)组成的网络,以及 N (1 ≤ N ≤ 5,000)个交叉路口(编号为1..N),每一条道... 阅读全文
posted @ 2015-10-12 10:48 HTWX 阅读(165) 评论(0) 推荐(0) 编辑
摘要: DescriptionInput第一行给出N,W第二行到第N+1行:每行给出二个整数x,y,输入的x严格递增,并且第一个x总是1Output输出一个整数,表示城市中最少包含的建筑物数量Sample Input10 261 12 25 16 38 111 015 217 320 222 1单调栈,在读... 阅读全文
posted @ 2015-10-06 09:43 HTWX 阅读(116) 评论(0) 推荐(0) 编辑
摘要: DescriptionFarmer John's cows, pampered since birth, have reached new heights of fastidiousness. They now require their barn to be immaculate. Farmer ... 阅读全文
posted @ 2015-10-05 21:13 HTWX 阅读(138) 评论(0) 推荐(0) 编辑