随笔分类 - poj
摘要:Radar InstallationTime Limit:1000MSMemory Limit:10000KTotal Submissions:48890Accepted:10917DescriptionAssume the coasting is an infinite straight line...
阅读全文
摘要:The Pilots Brothers' refrigeratorTime Limit:1000MSMemory Limit:65536KTotal Submissions:17450Accepted:6600Special JudgeDescriptionThe game “The Pilots ...
阅读全文
摘要:Flip GameTime Limit:1000MSMemory Limit:65536KTotal Submissions:28805Accepted:12461DescriptionFlip game is played on a rectangular 4x4 field with two-s...
阅读全文
摘要:Closest Common AncestorsTime Limit:2000MSMemory Limit:10000KTotal Submissions:14314Accepted:4607DescriptionWrite a program that takes as input a roote...
阅读全文
摘要:Fence RepairTime Limit:2000MSMemory Limit:65536KTotal Submissions:23532Accepted:7491DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needsN(1 ≤N≤ 20,000) planks of wood, each having some integer lengthLi(1 ≤Li≤ 50,000) uni
阅读全文
摘要:Sorting It All OutTime Limit:1000MSMemory Limit:10000KTotal Submissions:26088Accepted:9035DescriptionAn 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 i
阅读全文
摘要:MatrixTime Limit:3000MSMemory Limit:65536KTotal Submissions:16797Accepted:6312DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 14 #include15 #define N 100516 int c[N][N];17 int lowbit(int i)
阅读全文
摘要:Mobile phonesTime Limit:5000MSMemory Limit:65536KTotal Submissions:13889Accepted:6451DescriptionSuppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares form an S * S matrix with the rows and columns numbered
阅读全文
摘要:Ultra-QuickSortTime Limit:7000MSMemory Limit:65536KTotal Submissions:37971Accepted:13672DescriptionIn 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
阅读全文
摘要:StarsTime Limit:1000MSMemory Limit:65536KTotal Submissions:29888Accepted:13066DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and not to the
阅读全文
摘要:A Bug's LifeTime Limit:10000MSMemory Limit:65536KTotal Submissions:26599Accepted:8676DescriptionBackgroundProfessor 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 gender
阅读全文
摘要:Find them, Catch themTime Limit:1000MSMemory Limit:10000KTotal Submissions:28649Accepted:8761DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to identify whi
阅读全文
摘要:Power StringsTime Limit:3000MSMemory Limit:65536KTotal Submissions:28859Accepted:12045DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplicatio
阅读全文
摘要:Musical ThemeTime Limit:1000MSMemory Limit:30000KTotal Submissions:16162Accepted:5577DescriptionA musical melody is represented as a sequence of N (1 23 #include 24 #define N 20005 25 int wa[N],wb[N],ws[N],wv[N],wd[N]; 26 int rank[N],height[N]; 27 int Max(int a,int b) 28 { 29 return a>b?a:b; 30 .
阅读全文
摘要:KingTime Limit:1000MSMemory Limit:10000KTotal Submissions:9331Accepted:3478DescriptionOnce, in one kingdom, there was a queen and that queen was expecting a baby. The queen prayed: ``If my child was a son and if only he was a sound king.'' After nine months her child was born, and indeed, sh
阅读全文
摘要:Integer IntervalsTime Limit:1000MSMemory Limit:10000KTotal Submissions:12192Accepted:5145DescriptionAn integer interval [a,b], a 16 #include17 #include18 #define N 1000519 #define inf 0x7ffffff20 using namespace std;21 struct node{22 int s,e;23 }edge[N];24 int d[N];25 int n,up,down;26 void bellm...
阅读全文
摘要:LayoutTime Limit:1000MSMemory Limit:65536KTotal Submissions:5955Accepted:2842DescriptionLike everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 =d 6 求点1到点n的最长距离,无限远输出-2,不存在输出-1 7 8 差分约束: 9 对差分约束有一定的了解了,不过最大的问题还是在构图上,因为构图错了好几次。10 1...
阅读全文
摘要:Is the Information Reliable?Time Limit:3000MSMemory Limit:131072KTotal Submissions:10303Accepted:3204DescriptionThe galaxy war between the Empire Draco and the Commonwealth of Zibu broke out 3 years ago. Draco established a line of defense called Grot. Grot is a straight line withNdefense stations.
阅读全文
摘要:XYZZYTime Limit:1000MSMemory Limit:30000KTotal Submissions:3105Accepted:887DescriptionThe prototypical computer adventure game, first designed by Will Crowther on the PDP-10 in the mid-1970s as an attempt at computer-refereed fantasy gaming, and expanded into a puzzle-oriented game by Don Woods at S
阅读全文
摘要:ArbitrageTime Limit:1000MSMemory Limit:65536KTotal Submissions:13800Accepted:5815DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US Dollar buys 0.5 British pound,
阅读全文

浙公网安备 33010602011771号