Colored stones Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1759 Accepted: 829 Description You are given a row of m stones each of which has one of k different colors. What is the minimum number of stones you must remove so that no two…
Strange Towers of Hanoi Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 2677 Accepted: 1741 Description Background Charlie Darkbrown sits in another one of those boring Computer Science lessons: At the moment the teacher just explains the…
World Cup Noise Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 16374 Accepted: 8097 Description Background "KO-RE-A, KO-RE-A" shout 54.000 happy football fans after their team has reached the semifinals of the FIFA World Cup in their…
Common Subsequence Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 44464 Accepted: 18186 Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, -, xm…
To the Max Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 44723 Accepted: 23679 Description Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within…
Common Subsequence Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 22698 Accepted Submission(s): 9967 Problem Description A subsequence of a given sequence is the given sequence with some el…
题目 CF2B The least round way 做法 后面\(0\)的个数,\(2\)和\(5\)是\(10\)分解质因数 则把方格中的每个数分解成\(2\)和\(5\),对\(2\)和\(5\)求两边动规,得出最小值\(ans=min(num_2,num_5)\) 我们贪心地选择最小值所对应的\(2\)或\(5\),然后从\((n,n)\)按动规路径返回 Code #include<bits/stdc++.h> typedef int LL; const LL maxn=1e3+9;…
主题链接: http://poj.org/problem? id=2513 Colored Sticks Time Limit: 5000MS Memory Limit: 128000K Total Submissions: 30955 Accepted: 8159 Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is i…
题目链接: http://poj.org/problem?id=2513 http://bailian.openjudge.cn/practice/2513?lang=en_US Time Limit: 5000MS Memory Limit: 128000K Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possi…