![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
POJ
POJ_刷题相关
shui2104
这个作者很懒,什么都没留下…
展开
-
PO3253(贪心)
POJ3253(贪心)Fence RepairDescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer length Li (1 ≤ Li ≤ 50,000) units. H原创 2020-06-16 00:52:19 · 1932 阅读 · 0 评论 -
PO3069(贪心)
POJ3069(贪心)Saruman’s ArmyDescriptionSaruman the White must lead his army along a straight path from Isengard to Helm’s Deep. To keep track of his forces, Saruman distributes seeing stones, known as palantirs, among the troops. Each palantir has a maxim原创 2020-06-16 00:51:47 · 1349 阅读 · 0 评论 -
PO2586(贪心)
POJ2586(贪心)Y2K Accounting BugDescriptionAccounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc.All what they remember is that MS Inc. posted a surplus or a deficit each m原创 2020-06-16 00:51:05 · 422 阅读 · 0 评论 -
PO1382(贪心)
POJ1382(贪心)Radar InstallationDescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, ca原创 2020-06-16 00:49:47 · 1894 阅读 · 0 评论 -
PO1065(贪心)
POJ1065(贪心)Wooden SticksDescriptionThere is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. It needs some time, called setup time, for t原创 2020-06-16 00:49:09 · 3505 阅读 · 0 评论 -
PO3617(贪心)
POJ1382(贪心)Best Cow LineDescriptionFJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line and herds them past the judges.The contest organizers adopted a n原创 2020-06-16 00:55:06 · 2337 阅读 · 0 评论 -
POJ3784
POJ3784(链表)Running MedianDescriptionFor this problem, you will write a program that reads in a sequence of 32-bit signed integers. After each odd-indexed value is read, output the median (middle value) of the elements received so far.InputThe first l原创 2020-08-27 18:39:44 · 224 阅读 · 0 评论 -
POJ1250
POJ1250(链表)Tanning SalonDescriptionTan Your Hide, Inc., owns several coin-operated tanning salons. Research has shown that if a customer arrives and there are no beds available, the customer will turn around and leave, thus costing the company a sale.原创 2020-08-27 18:39:06 · 364 阅读 · 1 评论 -
POJ3259(栈)
POJ3259(栈)Bad Hair DayDescriptionSome of Farmer John’s N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants to count the number of other cows that can see the top of other cows’ heads.原创 2020-08-19 22:55:46 · 115 阅读 · 0 评论 -
POJ2259(队列)
POJ2259(队列)Team QueueDescriptionQueues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not so well known, though it occurs often in everyday life. At lunch time the queue in front of the原创 2020-08-19 22:54:54 · 626 阅读 · 0 评论 -
POJ2418(BST)
POJ2418(BST)Hardwood SpeciesDescriptionHardwoods are the botanical group of trees that have broad leaves, produce a fruit or nut, and generally go dormant in the winter.America’s temperate climates produce forests with hundreds of hardwood species – t原创 2020-08-04 22:38:30 · 184 阅读 · 0 评论 -
POJ1577(BST)
POJ1577(BST)Falling LeavesDescriptionFigure 1Figure 1 shows a graphical representation of a binary tree of letters. People familiar with binary trees can skip over the definitions of a binary tree of letters, leaves of a binary tree, and a binary sea原创 2020-08-04 22:37:02 · 262 阅读 · 0 评论 -
POJ1339(哈夫曼树)
POJ1339(哈夫曼树)poker card gameDescriptionSuppose you are given many poker cards. As you have already known, each card has points ranging from 1 to 13. Using these poker cards, you need to play a game on the cardboard in Figure 1. The game begins with a p原创 2020-07-21 21:06:54 · 143 阅读 · 0 评论 -
POJ1105(二叉树模拟)
POJ1105(树)S-TreesDescriptionA Strange Tree (S-tree) over the variable set Xn = {x1,x2,…,xn} is a binary tree representing a Boolean function f:{0,1}->{0,1}. Each path of the S-tree begins at the root node and consists of n+1 nodes. Each of the S-tre原创 2020-07-21 21:06:08 · 275 阅读 · 0 评论 -
POJ3026(最小生成树)
POJ3026(最小生成树)Borg MazeDescriptionThe 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. Each Borg individua原创 2020-07-13 20:31:37 · 179 阅读 · 0 评论 -
POJ2485(最小生成树)
POJ2485(最小生成树)HighwaysDescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government is aware of this problem. They’re planning to build some原创 2020-07-13 20:30:53 · 229 阅读 · 0 评论 -
POJ1789(最小生成树)
POJ1789(最小生成树)Truck HistoryDescriptionAdvanced 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 truck. The code原创 2020-07-13 20:30:04 · 298 阅读 · 0 评论 -
POJ1258(最小生成树)
POJ1258(最小生成树)Agri-NetDescriptionFarmer 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 speed connection for hi原创 2020-07-13 20:29:04 · 249 阅读 · 0 评论 -
POJ2367(拓扑排序)
POJ2367(拓扑排序)Genealogical treeDescriptionThe system of Martians’ blood relations is confusing enough. Actually, Martians bud when they want and where they want. They gather together in different groups, so that a Martian can have one parent as well as原创 2020-07-06 22:23:24 · 287 阅读 · 0 评论 -
POJ1094(拓扑排序)
POJ1094(拓扑排序)Sorting It All OutDescriptionAn ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to largest. For example, the sorted sequence A, B, C, D implies that原创 2020-07-06 21:45:04 · 257 阅读 · 0 评论 -
POJ1125(FLoyed)
POJ1125Stockbroker GrapevineDescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in the stock market. For ma原创 2020-07-01 00:14:53 · 665 阅读 · 1 评论 -
POJ1062(Dijkstra)
POJ1062昂贵的聘礼Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。“探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换,或者替他弄来其他的东西,他可以降低价格。探险家于是又跑到其他地方,其他人也提出了类原创 2020-07-01 00:14:24 · 1635 阅读 · 0 评论 -
POJ3194(DFS)
POJ3194(DFS)EquidivisionsDescriptionAn equidivision of an n × n square array of cells is a partition of the n2 cells in the array in exactly n sets, each one with n contiguous cells. Two cells are contiguous when they have a common side.A good equidivi原创 2020-06-23 17:24:34 · 132 阅读 · 0 评论 -
POJ2386(DFS)
POJ2386(DFS)Lake CountingDescriptionDue to recent rains, water has pooled in various places in Farmer John’s field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square contains either water (‘W’)原创 2020-06-23 17:23:59 · 138 阅读 · 0 评论 -
POJ1979(DFS)
POJ1979(DFS)Red and BlackDescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can’t move on red ti原创 2020-06-23 17:23:12 · 206 阅读 · 0 评论 -
POJ1753(DFS)
POJ1753(DFS)Flip GameDescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying either it’s black or white side up原创 2020-06-23 17:22:30 · 213 阅读 · 0 评论 -
POJ1562(DFS)
POJ1562(DFS)Oil DepositsDescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides the land into numer原创 2020-06-23 17:21:54 · 150 阅读 · 0 评论 -
POJ1111(DFS)
POJ1111(DFS)Image PerimetersDescriptionTechnicians in a pathology lab analyze digitized images of slides. Objects on a slide are selected for analysis by a mouse click on the object. The perimeter of the boundary of an object is one useful measure. You原创 2020-06-23 17:21:17 · 242 阅读 · 0 评论 -
POJ3984(BFS)
POJ3984(BFS)迷宫问题Description定义一个二维数组:int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。Input一个5 × 5的二维数组,表示一个迷宫。数据保证有唯一解。Output原创 2020-06-23 17:08:04 · 170 阅读 · 0 评论 -
POJ3414(BFS)
POJ3414(BFS)PotsDescriptionYou are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap;DROP(i) empty the pot i to the drain;POUR(i,j) pour原创 2020-06-23 17:07:25 · 136 阅读 · 0 评论 -
POJ2251(BFS)
POJ2251(BFS)Dungeon MasterDescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south, east, west, u原创 2020-06-23 17:06:52 · 200 阅读 · 0 评论 -
POJ1426(BFS)
POJ1426(BFS)Find The MultipleDescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 200 and there is a corres原创 2020-06-23 17:06:17 · 566 阅读 · 0 评论 -
POJ2965(枚举)
POJ2965(枚举)The Pilots Brothers’ refrigeratorThe Pilots Brothers’ refrigeratorDescriptionThe game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 handles on the refrigerator doo原创 2020-06-09 18:42:56 · 98 阅读 · 0 评论 -
POJ1753(枚举)
POJ1753(枚举)Flip GameDescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying either it’s black or white side up.原创 2020-06-09 18:41:02 · 185 阅读 · 0 评论