
POJ
POJ
Wanidde
本人很懒,什么都没有留下 ^_^
展开
-
POJ 2262 - Goldbach's Conjecture (哥德巴赫猜想)
In 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture:Every even number greater than 4 can bewritten as the sum of t...原创 2018-07-18 18:05:29 · 262 阅读 · 0 评论 -
POJ 1062 - 昂贵的聘礼 (dijkstra)
年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换,或者替他弄来其他的东西,...原创 2018-07-27 17:14:59 · 153 阅读 · 0 评论 -
POJ 3026 - Borg Maze (BFS + Prim)
The Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to describe the group consciousness of the Borg civilization. E...原创 2018-07-31 11:38:54 · 225 阅读 · 0 评论 -
POJ 3692 - Kindergarten (最大团)
KindergartenTime Limit: 2000MS Memory Limit: 65536K Total Submissions: 7658 Accepted: 3777 DescriptionIn a kindergarten, there are a lot of kids. All girls of the kids know eac...原创 2018-08-09 15:25:06 · 168 阅读 · 0 评论 -
POJ 3268 - Silver Cow Party (dijkstra)
One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectional (one-way ro...原创 2018-08-05 17:17:59 · 309 阅读 · 0 评论 -
POJ 1860 - Currency Exchange (正权回路 Bellman - Ford)
Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There can...原创 2018-07-28 11:45:56 · 166 阅读 · 0 评论 -
POJ 2524 - Ubiquitous Religions (并查集)
There are so many different religions in the world today that it is difficult to keep track of them all. You are interested in finding out how many different religions students in your university beli...原创 2018-08-06 16:45:15 · 171 阅读 · 0 评论 -
POJ 1611 - The Suspects (并查集)
Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to s...原创 2018-08-06 16:51:51 · 136 阅读 · 0 评论 -
POJ 2236 - Wireless Network (并查集)
An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in the n...原创 2018-08-06 17:04:06 · 158 阅读 · 0 评论 -
POJ 2492 - A Bug's Life (种类并查集)
Background Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the opposite gend...原创 2018-08-07 11:00:32 · 551 阅读 · 0 评论 -
POJ 1797 - Heavy Transportation (最短路变形 Dijkstra)
BackgroundHugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cust...原创 2018-07-27 14:46:50 · 313 阅读 · 0 评论 -
POJ 2349 - Arctic Network (最小生成树 Prim)
The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every o...原创 2018-07-30 17:32:45 · 197 阅读 · 0 评论 -
POJ 1789 - Truck History (最小生成树 Prim)
Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code describing each type of a tr...原创 2018-07-30 17:22:10 · 168 阅读 · 0 评论 -
POJ 1740 - A New Stone Game (Nim博弈变形)
Alice and Bob decide to play a new stone game.At the beginning of the game they pick n(1<=n<=10) piles of stones in a line. Alice and Bob move the stones in turn.At each step of the game,the pl...原创 2018-07-19 10:18:16 · 231 阅读 · 0 评论 -
POJ 2234 - Matches Game (尼姆博奕(Nimm Game))
Here is a simple game. In this game, there are several piles of matches and two players. The two player play in turn. In each turn, one can choose a pile and take away arbitrary number of matches from...原创 2018-07-19 10:31:23 · 246 阅读 · 0 评论 -
博弈问题
一、尼姆博奕(Nimm Game): 有N堆石头,每堆石头数目在1到100之间,最多有10堆.两人分别取走石头.取石头的规则是:每次只能从1堆中取,每次取走至少1个。取过后还可以把这堆的石头任意分配到其它石子数不为0的堆上,当然也可以不分配。问给定这些石头堆的情况,两人轮流取,谁取走最后一个石子谁胜利,问是先取的胜利还是后取的胜利.双方最优策略。 POJ - 2234...原创 2018-07-19 11:46:37 · 670 阅读 · 0 评论 -
POJ 1082 - Calendar Game
Adam and Eve enter this year's ACM International Collegiate Programming Contest. Last night, they played the Calendar Game, in celebration of this contest. This game consists of the dates from January...原创 2018-07-19 16:23:32 · 207 阅读 · 0 评论 -
POJ 1258 - Agri-Net (Prim最小生成树)
Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course.Farmer John ordered a high spee...原创 2018-07-29 21:30:17 · 179 阅读 · 0 评论 -
POJ 1751 - Highways (Prim)
The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already constructed a numb...原创 2018-07-30 09:41:59 · 170 阅读 · 0 评论 -
POJ 1502 - MPI Maelstrom (Dijkstra最短路)
BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee's research advi...原创 2018-07-26 20:33:36 · 187 阅读 · 0 评论 -
POJ 2253 - Frogger(Dijkstra最短路)
Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists' sun...原创 2018-07-26 20:51:32 · 360 阅读 · 0 评论 -
POJ 3259 - Wormholes ( Floyd || Bellman - Ford)
While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that i...原创 2018-07-26 21:03:23 · 171 阅读 · 0 评论 -
POJ 1659 - Frogs' Neighborhood (havel 判断可图化)
未名湖附近共有N个大小湖泊L1, L2, ..., Ln(其中包括未名湖),每个湖泊Li里住着一只青蛙Fi(1 ≤ i ≤ N)。如果湖泊Li和Lj之间有水路相连,则青蛙Fi和Fj互称为邻居。现在已知每只青蛙的邻居数目x1, x2, ..., xn,请你给出每两个湖泊之间的相连关系。Input第一行是测试数据的组数T(0 ≤ T ≤ 20)。每组数据包括两行,第一行是整数N(2 < ...原创 2019-01-17 15:39:58 · 903 阅读 · 0 评论