Alignment Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 14486 Accepted: 4695 Description In the army, a platoon is composed by n soldiers. During the morning inspection, the soldiers are aligned in a straight line in front of the cap…
Alignment Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 10804 Accepted: 3464 Description In the army, a platoon is composed by n soldiers. During the morning inspection, the soldiers are aligned in a straight line in front of the cap…
Alignment Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 11450 Accepted: 3647 Description In the army, a platoon is composed by n soldiers. During the morning inspection, the soldiers are aligned in a straight line in front of the captain…
Description The advice to "buy low" is half the formula to success in the bovine stock market.To be considered a great investor you must also follow this problems' advice: "Buy low; buy lower" Each time you buy a stock, you must purcha…
题意:对于一个序列,要求去掉正好K个数字,若能使其成为不上升子序列或不下降子序列,则“A is a magic array.”,否则"A is not a magic array.\n". 分析: 1.求一遍LCS,然后在将序列逆转,求一遍LCS,分别可得最长上升子序列和最长下降子序列的长度tmp1.tmp2. 2.n - tmp1 <= k或n - tmp2 <= k即可,需要去掉的去完之后,在已经是最长上升或最长下降的序列中随便去够k个就好了. #include<…
题目链接http://poj.org/problem?id=1836 Alignment Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 17331 Accepted: 5694 Description In the army, a platoon is composed by n soldiers. During the morning inspection, the soldiers are aligned in…
Testing the CATCHER Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 16515 Accepted: 6082 Description A military contractor for the Department of Defense has just completed a series of preliminary tests for a new defensive missile called th…
B. Once Again... time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given an array of positive integers a1, a2, ..., an × T of length n × T. We know that for any i > n it is true that …
Strategic game Time Limit: 2000MS Memory Limit: 10000K Total Submissions: 7490 Accepted: 3483 Description Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very sad…
Anniversary party Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5767 Accepted: 3335 Description There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure…