HDU-1069 Monkey and Banana

Monkey and Banana (HDU - 1069) 题面 A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monkey is clever enough, it shall be able to reach the banana by placing one block on the top another to build a tower and climb up to get its favorite food. ...

2018-04-22 · Lordash

HDU-1029 Ignatius and the Princess IV

Ignatius and the Princess IV (HDU - 1029) 题面 “OK, you are not too bad, em… But you can never pass the next test.” feng5166 says. “I will tell you an odd number N, and then N integers. There will be a special integer among them, you have to tell me which integer is the special one after I tell you all the integers.” feng5166 says. “But what is the characteristic of the special integer?” Ignatius asks. ...

2018-04-22 · Lordash

HDU-1160 FatMouse's Speed

FatMouse’s Speed (HDU - 1160) 题面 FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as large a subset of this data as possible into a sequence so that the weights are increasing, but the speeds are decreasing. 输入 Input contains data for a bunch of mice, one mouse per line, terminated by end of file. ...

2018-03-30 · Lordash

POJ-1458 Common Subsequence

Common Subsequence (POJ-1458、HDU - 1159) 题面 A 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 X if there exists a strictly increasing sequence < i1, i2, …, ik > of indices of X such that for all j = 1,2,…,k, x ij = zj. For example, Z = < a, b, f, c > is a subsequence of X = < a, b, c, f, b, c > with index sequence < 1, 2, 4, 6 >. Given two sequences X and Y the problem is to find the length of the maximum-length common subsequence of X and Y. ...

2018-03-30 · Lordash

POJ-2533 Longest Ordered Subsequence

Longest Ordered Subsequence (POJ - 2533) 题面 A numeric sequence of ai is ordered if a1 < a2 < … < aN. Let the subsequence of the given numeric sequence ( a1, a2, …, aN) be any sequence ( ai1, ai2, …, aiK), where 1 <= i1 < i2 < … < iK <= N. For example, sequence (1, 7, 3, 5, 9, 4, 8) has ordered subsequences, e. g., (1, 7), (3, 4, 8) and many others. All longest ordered subsequences are of length 4, e. g., (1, 3, 5, 8). ...

2018-03-30 · Lordash