这道题我一开始想到用递归方法,可以把规模大的问题变成规模小的问题,但是觉得递归的时间复杂度很高,因为它会把相同的问题进行重复计算,然后我想是不是有什么down-up的方法,先把所有的子问题的结果保存起来,但是发现问题的最优解并不能由子问题的最优解推导出来。最后就想到买股票的时候,我们在一个局部极小的...
分类:
其他好文 时间:
2014-05-01 19:24:02
阅读次数:
250
Abstract. In mathematics a Voronoi diagram is a
way of dividing space into a number of regions. A set of points, called seeds,
sites, or generators is...
分类:
其他好文 时间:
2014-05-01 09:46:54
阅读次数:
493
Given an array of integers, find two numbers
such that they add up to a specific target number.The function twoSum should
return indices of the two nu...
分类:
其他好文 时间:
2014-05-01 08:35:40
阅读次数:
443
DescriptionAstronomers often examine star maps
where stars are represented by points on a plane and each star has Cartesian
coordinates. Let the level...
分类:
其他好文 时间:
2014-05-01 05:42:32
阅读次数:
368
Background:
It's fairly common for businesses to want to provide some high availability for their SQL Server databases, and one option is to have two SQL Server databases on separate machines with a SQL Server database mirrored....
分类:
数据库 时间:
2014-04-30 22:11:38
阅读次数:
520
懂放弃,学会放弃,但不要轻言放弃。我们要学会知道:放弃是一种艺术!...
分类:
其他好文 时间:
2014-04-29 13:42:21
阅读次数:
253
本文出自:http://blog.csdn.net/svitter/
题意:三种苹果,每种都有对应的Size,Value,给你一个背包空间,求最大的价值。
本题目的关键就在于非常大的背包空间
依据indicates the size (1 <=
100) 我们可以考虑在1000000(100^3)之外的空间放性价比最高的苹果。为什么时100^3?
要知道背包如果正好填满,而填满...
分类:
移动开发 时间:
2014-04-29 13:27:21
阅读次数:
436
Pick apples
Time Limit: 1000MS Memory limit: 165536K
题目描述
Once ago, there is a mystery yard which only produces three kinds of apples. The number of each kind is infinite. A girl carrying a...
分类:
移动开发 时间:
2014-04-29 13:18:22
阅读次数:
489
The blonde Angela has a new whim: internet chats. Of course, as any blonde, she writes her messages using the upper case. You are the moderator of Angela's favorite chat and you're fed up with her upp...
分类:
其他好文 时间:
2014-04-29 13:17:21
阅读次数:
293