poj3254Corn Fields
摘要:Corn Fields Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 13765 Accepted: 7232 Description Farmer John has purchased a lush new rectangul
阅读全文
posted @
2016-11-07 20:29
Beserious
阅读(225)
推荐(0) 编辑
codility MinAbsSum
摘要:For a given array A of N integers and a sequence S of N integers from the set {−1, 1}, we define val(A, S) as follows: val(A, S) = |sum{ A[i]*S[i] for
阅读全文
posted @
2016-11-04 19:19
Beserious
阅读(948)
推荐(0) 编辑
timus 1018. Binary Apple Tree
摘要:1018. Binary Apple Tree Time limit: 1.0 secondMemory limit: 64 MB Let's imagine how apple tree looks in binary computer world. You're right, it looks
阅读全文
posted @
2016-10-15 20:30
Beserious
阅读(479)
推荐(0) 编辑
等和的分隔子集
摘要:晓萌希望将1到N的连续整数组成的集合划分成两个子集合,且保证每个集合的数字和是相等。例如,对于N=3,对应的集合{1,2,3}能被划分成{3} 和 {1,2}两个子集合. 这两个子集合中元素分别的和是相等的。 对于N=3,我们只有一种划分方法,而对于N=7时,我们将有4种划分的方案。 输入包括一行,
阅读全文
posted @
2016-10-09 14:46
Beserious
阅读(602)
推荐(0) 编辑
Uva 11151 - Longest Palindrome
摘要:A palindrome is a string that reads the same from the left as it does from the right. For example, I, GAG and MADAM are palindromes, but ADAM is not.
阅读全文
posted @
2016-10-07 19:32
Beserious
阅读(374)
推荐(0) 编辑
Codeforces Round #119 (Div. 2)A. Cut Ribbon
摘要:A. Cut Ribbon time limit per test 1 second time limit per test memory limit per test 256 megabytes memory limit per test input standard input input ou
阅读全文
posted @
2016-10-07 19:07
Beserious
阅读(360)
推荐(0) 编辑
Codeforces Round #211 (Div. 2)B. Fence
摘要:B. Fence time limit per test 1 second time limit per test memory limit per test 256 megabytes memory limit per test input standard input input output
阅读全文
posted @
2016-10-07 16:50
Beserious
阅读(254)
推荐(0) 编辑
UVALive 6661 - Equal Sum Sets
摘要:Let us consider sets of positive integers less than or equal to n. Note that all elements of a set are different. Also note that the order of elements
阅读全文
posted @
2016-10-07 16:05
Beserious
阅读(445)
推荐(0) 编辑
Timus 1146. Maximum Sum
摘要:1146. Maximum Sum Time limit: 0.5 secondMemory limit: 64 MB Given a 2-dimensional array of positive and negative integers, find the sub-rectangle with
阅读全文
posted @
2016-10-07 15:53
Beserious
阅读(267)
推荐(0) 编辑
UVALive 4212 - Candy
摘要:Little Charlie is a nice boy addicted to candies. He is even a subscriber to All Candies Magazine and was selected to participate in the International
阅读全文
posted @
2016-10-07 13:37
Beserious
阅读(364)
推荐(0) 编辑
MBEEWALK - Bee Walk
摘要:Input Output dp Input Output
阅读全文
posted @
2016-10-05 15:13
Beserious
阅读(574)
推荐(0) 编辑
Uva 10036 - Divisibility
摘要:Consider an arbitrary sequence of integers. One can place + or - operators between integers in the sequence, thus deriving different arithmetical expr
阅读全文
posted @
2016-09-06 15:55
Beserious
阅读(384)
推荐(0) 编辑
Timus 1009. K-based Numbers
摘要:1009. K-based Numbers Time limit: 0.5 secondMemory limit: 64 MB Let’s consider K-based numbers, containing exactly N digits. We define a number to be
阅读全文
posted @
2016-09-06 15:14
Beserious
阅读(397)
推荐(0) 编辑
MBLAST - BLAST
摘要:There are given two strings, A and B. An expansion of some string X is a string created by adding or inserting any number (zero, one or more) of blank
阅读全文
posted @
2016-09-05 02:25
Beserious
阅读(321)
推荐(0) 编辑
完美平方
摘要:给一个正整数 n, 找到若干个完全平方数(比如1, 4, 9, ... )使得他们的和等于 n。你需要让平方数的个数最少。 给出 n = 12, 返回 3 因为 12 = 4 + 4 + 4。给出 n = 13, 返回 2 因为 13 = 4 + 9。 dp. 上面dp的时间复杂度是 O(n^2)空
阅读全文
posted @
2016-08-31 19:56
Beserious
阅读(1198)
推荐(0) 编辑
2015-2016 ACM-ICPC Pacific Northwest Regional Contest (Div. 2) S Surf
摘要:SurfNow that you've come to Florida and taken up surng, you love it! Of course, you've realized thatif you take a particular wave, even if it's very
阅读全文
posted @
2016-08-13 21:25
Beserious
阅读(474)
推荐(0) 编辑
Codeforces Round #367 (Div. 2)C. Hard problem
摘要:C. Hard problem time limit per test 1 second time limit per test memory limit per test 256 megabytes memory limit per test input standard input input
阅读全文
posted @
2016-08-12 14:43
Beserious
阅读(185)
推荐(0) 编辑
HDU 5794 A Simple Chess
摘要:A Simple Chess Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 614 Accepted Submission(s): 159 Pr
阅读全文
posted @
2016-08-05 10:17
Beserious
阅读(214)
推荐(0) 编辑
HDU 5791 Two
摘要:Two Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 163 Accepted Submission(s): 72 Problem Descri
阅读全文
posted @
2016-08-02 18:57
Beserious
阅读(441)
推荐(0) 编辑
HDU 5763Another Meaning
摘要:Another Meaning Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 526 Accepted Submission(s): 245 P
阅读全文
posted @
2016-07-29 12:07
Beserious
阅读(483)
推荐(0) 编辑