POJ
旺 崽
这个作者很懒,什么都没留下…
展开
-
POJ 3579 Median
POJ 3579 Median题目链接DescriptionGiven N numbers, X1, X2, … , XN, let us calculate the difference of every pair of numbers: ∣Xi - Xj∣ (1 ≤ i < j ≤ N). We can get C(N,2) differences through this work, and now your task is to find the median of the differenc原创 2020-10-07 15:16:36 · 3271 阅读 · 0 评论 -
POJ 3104 Drying
POJ 3104 Drying题目链接DescriptionIt is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has decided to use a radiator to make drying faster. But the radiator is small,原创 2020-09-25 16:56:08 · 2380 阅读 · 0 评论 -
POJ 3685 Matrix
POJ 3685 Matrix题目链接DescriptionGiven a N × N matrix A, whose element in the i-th row and j-th column Aij is an number that equals i2+100000×i+j2−100000×j+i×ji^2 + 100000 × i + j^2 - 100000 × j + i × ji2+100000×i+j2−100000×j+i×j, you are to find the M-th原创 2020-09-25 10:52:31 · 2344 阅读 · 0 评论 -
POJ 2777 Count Color
POJ 2777 Count Color题目链接DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem.There is a very long board with length L centimeter, L is a positive integer原创 2020-09-16 10:58:19 · 2546 阅读 · 2 评论 -
POJ 2104 K-th Number
POJ 2104 K-th Number题目链接DescriptionYou are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able to return quickly k-th order sta原创 2020-09-11 10:38:23 · 2404 阅读 · 0 评论 -
POJ 2135 Farm Tour
POJ 2135 Farm Tour题目链接DescriptionWhen FJ’s friends visit him on the farm, he likes to show them around. His farm comprises N (1 <= N <= 1000) fields numbered 1…N, the first of which contains his house and the Nth of which contains the big barn. A原创 2020-07-21 16:01:44 · 2373 阅读 · 0 评论 -
POJ 2478 Farey Sequence
POJ 2478 Farey Sequence题目链接DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arranged in increasing order. The first few areF2 = {1/2}F3 = {1/原创 2020-07-21 15:08:37 · 2330 阅读 · 1 评论 -
POJ 2115 C Looooops
POJ 2115 C Looooops题目链接DescriptionA Compiler Mystery: We are given a C-language style for loop of typefor (variable = A; variable != B; variable += C) statement;I.e., a loop which starts by setting variable to value A and while variable is not equ原创 2020-07-21 09:45:04 · 2317 阅读 · 0 评论 -
POJ 2823 Sliding Window
POJ 2823 Sliding Window题目链接DescriptionAn array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding wi原创 2020-07-16 17:22:03 · 2420 阅读 · 0 评论 -
POJ 2299 Ultra-QuickSort
POJ 2299 Ultra-QuickSort题目链接DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in ascending or原创 2020-07-16 10:27:02 · 2430 阅读 · 0 评论 -
POJ 1061 青蛙的约会
POJ 1061 青蛙的约会题目链接Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面的。为了帮助这两只乐观的青蛙,你被要求写一个程序来判断这两只青蛙是否能够碰面,原创 2020-07-11 15:36:12 · 2466 阅读 · 0 评论 -
POJ 2892 Tunnel Warfare
POJ 2892 Tunnel Warfare题目链接DescriptionDuring the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay in a line. Except the two at the e原创 2020-07-07 09:41:04 · 2413 阅读 · 0 评论 -
POJ 3264 Balanced Lineup
POJ 3264 Balanced Lineup题目链接DescriptionFor the daily milking, Farmer John’s N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows. To keep things simple, he wil原创 2020-07-05 18:38:53 · 2430 阅读 · 0 评论 -
POJ 1458 Common Subsequence
POJ 1458 Common Subsequence题目链接DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, …, xm > another sequence Z = < z1, z2, …, zk > is a subsequence of原创 2020-07-04 14:56:09 · 2412 阅读 · 0 评论 -
POJ 1185 炮兵阵地
POJ 1185 炮兵阵地题目链接Description司令部的将军们打算在 N∗MN*MN∗M 的网格地图上部署他们的炮兵部队。一个 N∗MN*MN∗M 的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的网格表示它能够攻击到的区域:沿横向左右各两格,沿纵向上下各原创 2020-07-02 10:52:22 · 2481 阅读 · 0 评论 -
POJ 1163 The Triangle
POJ 1163 The Triangle题目链接Description73 88 1 02 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that starts at the top and ends somewhere on原创 2020-06-28 17:35:24 · 2437 阅读 · 0 评论 -
POJ 2774 Long Long Message
POJ 2774 Long Long Message题目链接DescriptionThe little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days: his mother is getting ill. Being worried abo...原创 2020-04-25 17:22:08 · 2384 阅读 · 0 评论 -
POJ 2262 Goldbach's Conjecture
POJ 2262 Goldbach’s Conjecture题目链接DescriptionIn 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture:Every even numbe...原创 2020-04-24 15:25:58 · 2341 阅读 · 0 评论 -
POJ 3189 Steady Cow Assignment
POJ 3189 Steady Cow Assignment题目链接DescriptionFarmer John’s N (1 <= N <= 1000) cows each reside in one of B (1 <= B <= 20) barns which, of course, have limited capacity. Some cows really...原创 2020-04-21 16:15:36 · 2284 阅读 · 0 评论 -
POJ 2112 Optimal Milking
POJ 2112 Optimal Milking题目链接DescriptionFJ has moved his K (1 <= K <= 30) milking machines out into the cow pastures among the C (1 <= C <= 200) cows. A set of paths of various lengths r...原创 2020-04-21 15:32:33 · 2311 阅读 · 0 评论 -
POJ 2289 Jamie's Contact Groups
POJ 2289 Jamie’s Contact Groups题目链接DescriptionJamie is a very popular girl and has quite a lot of friends, so she always keeps a very long contact list in her cell phone. The contact list has becom...原创 2020-04-21 10:02:42 · 2480 阅读 · 0 评论 -
POJ 2594 Treasure Exploration
POJ 2594 Treasure Exploration题目链接DescriptionHave you ever read any book about treasure exploration? Have you ever see any film about treasure exploration? Have you ever explored treasure? If you ne...原创 2020-04-20 17:31:30 · 2259 阅读 · 0 评论 -
POJ 3436 ACM Computer Factory
POJ 3436 ACM Computer Factory题目链接DescriptionAs you know, all the computers used for ACM contests must be identical, so the participants compete on equal terms. That is why all these computers are h...原创 2020-04-19 16:15:00 · 2223 阅读 · 0 评论 -
POJ 1273 Drainage Ditches
POJ 1273 Drainage Ditches题目链接DescriptionEvery time it rains on Farmer John’s fields, a pond forms over Bessie’s favorite clover patch. This means that the clover is covered by water for awhile and ...原创 2020-04-17 16:42:30 · 2229 阅读 · 0 评论 -
POJ 3030 Antenna Placement
POJ 3030 Antenna PlacementDescriptionThe Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most striking reason why they g...原创 2020-04-12 15:32:36 · 2174 阅读 · 0 评论 -
POJ 3450 Corporate Identity
POJ 3450 Corporate IdentityDescriptionBeside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like trademarks. One o...原创 2020-03-31 11:05:06 · 2191 阅读 · 0 评论 -
POJ 3974 Palindrome
POJ 3974 PalindromeDescriptionAndy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, “Can you propose an efficient algorit...原创 2020-03-30 10:06:14 · 2193 阅读 · 0 评论 -
POJ 3080 Blue Jeans
POJ 3080 Blue JeansDescriptionThe Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors to ma...原创 2020-03-26 11:59:37 · 2266 阅读 · 0 评论 -
POJ 2752 Seek the Name, Seek the Fame
POJ 2752 Seek the Name, Seek the FameDescriptionThe little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies...原创 2020-03-21 15:42:20 · 2269 阅读 · 0 评论 -
POJ 2406 Power Strings
POJ 2406 Power StringsDescriptionGiven two strings a and b we define ab to be their concatenation. For example, if a = “abc” and b = “def” then ab = “abcdef”. If we think of concatenation as multipl...原创 2020-03-19 17:32:18 · 2250 阅读 · 0 评论 -
POJ 3461 Oulipo
POJ 3461 OulipoDescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter ‘e’. He was a member of the Oulipo group. A quote from the book:Tout avai...原创 2020-03-16 09:13:44 · 2155 阅读 · 0 评论 -
POJ 3233 Matrix Power Series
POJ 3233 Matrix Power SeriesDescriptionGiven a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak.InputThe input contains exactly one test case. The first line of input...原创 2020-03-11 11:40:06 · 2283 阅读 · 0 评论 -
POJ 3984 迷宫问题
POJ 3984 迷宫问题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表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线...原创 2020-03-06 14:43:16 · 3104 阅读 · 0 评论 -
POJ 1584 A Round Peg in a Ground Hole
POJ 1584 A Round Peg in a Ground HoleDescriptionThe DIY Furniture company specializes in assemble-it-yourself furniture kits. Typically, the pieces of wood are attached to one another using a wooden...原创 2020-02-21 10:42:20 · 2662 阅读 · 0 评论 -
POJ 3449 Geometric Shapes
POJ 3449 Geometric ShapesDescriptionWhile creating a customer logo, ACM uses graphical utilities to draw a picture that can later be cut into special fluorescent materials. To ensure proper processi...原创 2020-02-20 17:42:46 · 2841 阅读 · 0 评论 -
POJ 1039 Pipe
POJ 1039 PipeDescriptionThe GX Light Pipeline Company started to prepare bent pipes for the new transgalactic light pipeline. During the design phase of the new pipe shape the company ran into the p...原创 2020-02-19 10:44:43 · 2721 阅读 · 0 评论 -
POJ 2826 An Easy Problem?!
POJ 2826 An Easy Problem?!DescriptionIt’s raining outside. Farmer Johnson’s bull Ben wants some rain to water his flowers. Ben nails two wooden boards on the wall of his barn. Shown in the pictures ...原创 2020-02-17 12:39:43 · 2794 阅读 · 0 评论 -
POJ 1006 Biorhythms
POJ 1006 BiorhythmsDescriptionSome people believe that there are three cycles in a person’s life that start the day he or she is born. These three cycles are the physical, emotional, and intellectua...原创 2020-02-16 12:45:16 · 2645 阅读 · 0 评论 -
POJ 3347 Kadj Squares
POJ 3347 Kadj SquaresDescriptionIn this problem, you are given a sequence S1,S2,...,SnS_1, S_2, ..., S_nS1,S2,...,Sn of squares of different sizes. The sides of the squares are integer numbers. W...原创 2020-01-29 11:42:38 · 2637 阅读 · 0 评论 -
POJ 1696 Space Ant
POJ 1696 Space AntDescriptionThe most exciting space discovery occurred at the end of the 20th century. In 1999, scientists traced down an ant-like creature in the planet Y1999 and called it M11. It...原创 2020-01-28 18:24:41 · 2786 阅读 · 0 评论