上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 29 下一页
摘要: Problem DescriptionJapanese Mahjong is a four-player game. The game needs four people to sit around a desk and play with a set of Mahjong tiles. A set of Mahjong tiles contains four copies of the tiles described next:One to nine Man, which we use 1m to 9m to represent;One to nine Sou, which we use 1 阅读全文
posted @ 2013-10-03 17:41 Oyking 阅读(304) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionWe have met so many problems on the tree, so today we will have a query problem on a set of trees.There are N nodes, each node will... 阅读全文
posted @ 2013-09-27 21:11 Oyking 阅读(297) 评论(0) 推荐(0) 编辑
摘要: You are given a tree (an acyclic undirected connected graph) withNnodes, and edges numbered 1, 2, 3...N-1.We will ask you to perfrom some instructions of the following form:CHANGE i ti: change the cost of the i-th edge to tiorQUERY a b: ask for the maximum edge cost on the path from node a to node b 阅读全文
posted @ 2013-09-25 20:29 Oyking 阅读(868) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionZero and One are good friends who always have fun with each other. This time, they decide to do something on a tree which is a kind of graph that there is only one path from node to node. First, Zero will give One an tree and every node in this tree has a value. Then, Zero will as 阅读全文
posted @ 2013-09-24 15:21 Oyking 阅读(850) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionPfctgeorge is totally a tall rich and handsome guy. He plans to build a huge water transmission network that covers the whole south... 阅读全文
posted @ 2013-09-23 18:34 Oyking 阅读(405) 评论(0) 推荐(0) 编辑
摘要: The traffic network in a country consists of N cities (labeled with integers from 1 to N) and N-1 roads connectingthe cities. There is a unique path between each pair of different cities, and we know the exact length of each road.Write a program that will, for each of the K given pairs of cities, fi 阅读全文
posted @ 2013-09-20 23:24 Oyking 阅读(436) 评论(0) 推荐(0) 编辑
摘要: Description在一些一对一游戏的比赛(如下棋、乒乓球和羽毛球的单打)中,我们经常会遇到A胜过B,B胜过C而C又胜过A的有趣情况,不妨形象的称之为剪刀石头布情况。有的时候,无聊的人们会津津乐道于统计有多少这样的剪刀石头布情况发生,即有多少对无序三元组(A, B, C),满足其中的一个人在比赛中... 阅读全文
posted @ 2013-09-20 15:27 Oyking 阅读(441) 评论(0) 推荐(0) 编辑
摘要: DescriptionWhen FJ's friends visit him on the farm, he likes to show them around. His farm comprises N (1 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 const int MAXV = 1010; 9 const int MAXE = 40010;10 const int INF = 0x7f7f7f7f;11 12 struct SPFA_COST_FLOW {13 boo... 阅读全文
posted @ 2013-09-20 11:13 Oyking 阅读(351) 评论(0) 推荐(0) 编辑
摘要: DescriptionDearboy, a goods victualer, now comes to a big problem, and he needs your help. In his sale area there are N shopkeepers (marked from 1 to N) which stocks goods from him.Dearboy has M supply places (marked from 1 to M), each provides K different kinds of goods (marked from 1 to K). Once s 阅读全文
posted @ 2013-09-20 00:49 Oyking 阅读(235) 评论(0) 推荐(0) 编辑
摘要: DescriptionYoung naturalist Bill studies ants in school. His ants feed on plant-louses that live on apple trees. Each ant colony needs its own apple tree to feed itself.Bill has a map with coordinates ofnant colonies andnapple trees. He knows that ants travel from their colony to their feeding place 阅读全文
posted @ 2013-09-19 20:24 Oyking 阅读(544) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 29 下一页