
POJ
Pegasi_Tio
蒟蒻,学习算法中,记录有特点的题
展开
-
POJ 1456.Supermarket
POJ 1456.SupermarketDescriptionA supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time un...原创 2019-04-04 15:18:08 · 182 阅读 · 0 评论 -
POJ 3070.Fibonacci
DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are:0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …An...原创 2019-05-10 16:45:27 · 203 阅读 · 0 评论 -
POJ 1734.Sightseeing trip
DescriptionThere is a travel agency in Adelton town on Zanzibar island. It has decided to offer its clients, besides many other attractions, sightseeing the town. To earn as much as possible from thi...原创 2019-05-07 15:52:02 · 249 阅读 · 0 评论 -
POJ 3090.Visible Lattice Points
DescriptionA lattice point (x, y) in the first quadrant (x and y are integers greater than or equal to 0), other than the origin, is visible from the origin if the line from (0, 0) to (x, y) does not...原创 2019-05-09 16:39:50 · 203 阅读 · 0 评论 -
POJ 1094.Sorting It All Out
DescriptionAn 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...原创 2019-05-06 16:36:26 · 158 阅读 · 0 评论 -
POJ 2689Prime Distance
DescriptionThe branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the questio...原创 2019-04-30 19:09:05 · 181 阅读 · 0 评论 -
POJ 2823.Sliding Window
DescriptionAn array of sizen ≤ 10^6is 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 wind...原创 2019-04-20 12:06:15 · 171 阅读 · 0 评论 -
POJ 3974.Palindrome
DescriptionAndy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, “Can you propose an efficient algorithm to find the lengt...原创 2019-04-19 18:01:13 · 226 阅读 · 0 评论 -
POJ 3349.Snowflake Snow Snowflakes
描述You may have heard that no two snowflakes are alike. Your task is to write a program to determine whether this is really true. Your program will read information about a collection of snowflakes, a...原创 2019-04-18 18:27:25 · 283 阅读 · 0 评论 -
POJ 3764The xor-longest Path
DescriptionIn an edge-weighted tree, the xor-length of a path p is defined as the xor sum of the weights of edges on p:⊕ is the xor operator.We say a path the xor-longest path if it has the larges...原创 2019-04-23 11:00:06 · 224 阅读 · 0 评论 -
LeetCode 84.柱状图中的最大矩形/POJ 2559
DescriptionA histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figure on the...原创 2019-04-17 20:48:34 · 444 阅读 · 0 评论 -
POJ 3889 Fractal Streets
POJ 3889 Fractal StreetsInputOn the first line of the input is a positive integer, the number of test cases. Then for each test case:A line containing a three positive integers, n < 16 and h, o ...原创 2019-04-14 16:40:38 · 239 阅读 · 0 评论 -
POJ 2018 Best Cow Fences
DescriptionFarmer John’s farm consists of a long row of N (1 <= N <= 100,000)fields. Each field contains a certain number of cows, 1 <= ncows <= 2000.FJ wants to build a fence around a c...原创 2019-04-16 22:50:00 · 171 阅读 · 0 评论 -
POJ 1088.滑雪
POJ 1088.滑雪DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 2...原创 2019-03-28 12:00:49 · 151 阅读 · 0 评论 -
POJ 1845.Sumdiv
Consider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901).输入The only line contains the two natural number...原创 2019-04-12 17:59:55 · 141 阅读 · 0 评论 -
POJ 3263.Tallest Cow
POJ 3263.Tallest CowDescriptionFJ's N (1 ≤ N ≤ 10,000) cows conveniently indexed 1..N are standing in a line.Each cow has a positive integer height (which is a bit of secret). You are told only th...原创 2019-04-10 12:18:23 · 192 阅读 · 0 评论 -
POJ 3233.Matrix Power Series
DescriptionGiven 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 contains three positive inte...原创 2019-05-10 21:07:31 · 266 阅读 · 0 评论