2016年10月9日
摘要:
晓萌希望将1到N的连续整数组成的集合划分成两个子集合,且保证每个集合的数字和是相等。例如,对于N=3,对应的集合{1,2,3}能被划分成{3} 和 {1,2}两个子集合. 这两个子集合中元素分别的和是相等的。 对于N=3,我们只有一种划分方法,而对于N=7时,我们将有4种划分的方案。 输入包括一行,
阅读全文
posted @ 2016-10-09 14:46
Beserious
阅读(625)
推荐(0)
2016年10月7日
摘要:
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
阅读(384)
推荐(0)
摘要:
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
阅读(371)
推荐(0)
摘要:
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
阅读(263)
推荐(0)
摘要:
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
阅读(458)
推荐(0)
摘要:
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
阅读(276)
推荐(0)
摘要:
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
阅读(372)
推荐(0)
2016年10月6日
摘要:
问题描述 农民约翰在喂奶牛的时候被另一个问题卡住了。他的所有N(1 <= N <= 100,000)个奶牛在他面前排成一行(按序号1..N的顺序),按照它们的社会等级排序。奶牛#1有最高的社会等级,奶牛#N最低。每个奶牛同时被指定了一个不唯一的附加值,这个数在0..2^21 - 1的范围内。 帮助农
阅读全文
posted @ 2016-10-06 15:32
Beserious
阅读(266)
推荐(0)
2016年10月5日
摘要:
Input Output dp Input Output
阅读全文
posted @ 2016-10-05 15:13
Beserious
阅读(586)
推荐(0)
2016年9月21日
摘要:
贪心?瞎搞 先排个序,然后扫一遍,边扫边维护一个数组v v的长度为3 设vs数组的最后一个是x 如果abs(a[i]-x)大于10 那么贪心的策略我就 添加个v+10相应的ans++. 如果v数组的长度到达3了,就清空v数组。 然后注意一些细节就好了... 我代码写的好挫
阅读全文
posted @ 2016-09-21 21:00
Beserious
阅读(1264)
推荐(0)