題意;給一串聯續的數 向其中加空格 使之分成符合 波穀 波峰 波穀 波峰。。依次排列的數波穀即與之相鄰兩數比它大 波峰即相鄰的數比它小dp[i][j][0、1] 表示以第 i 到第 j 位之間表示的數為波穀或波峰所得到的最大值dp方程: int tmp=is(i,j,k,p);// 求 i 到 j 之間構成的數 是否可以作為 k 到 p 之間構成的數(在 i 之後)的波穀 若兩數相等 返回0 if(tmp==1)//i
Cubic Eight-PuzzleTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 1301 Accepted: 434DescriptionLet’s play a puzzle using eight cubes placed on a 3 × 3 board leaving one empty square.Faces of cubes are painted with three colors. As a puzzle
The Bottom of a GraphTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 7699 Accepted: 3161DescriptionWe will use the following (standard) definitions from graph theory. Let V be a nonempty and finite set, its elements being called vertices
Proving EquivalencesTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1962 Accepted Submission(s): 743Problem DescriptionConsider the following exercise, found in a generic linear algebra
Popular CowsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 19647 Accepted: 7960DescriptionEvery cow's dream is to become the most popular cow in the herd. In a herd of N (1 <= N <= 10,000) cows, you are given up to M (1 <= M <=
題目地址:http://poj.org/problem?id=1952BUY LOW, BUY LOWERTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 6692 Accepted: 2302DescriptionThe advice to "buy low" is half the formula to success in the bovine stock market.To be considered a great
The Bermuda TriangleTime Limit: 2000MS Memory Limit: 32768KTotal Submissions: 1098 Accepted: 510DescriptionPeople in the hidden region of the Bermuda Triangle make everything they need in triangular shapes. One day, someone decided to break the rule