摘要: VC++6.0 IDE的工程用Code::Blocks来打开、编译、调试终极配置方案转载自http://blog.csdn.net/liquanhai/article/details/6618300 引子:竟然可以用Code::Blocks来打开、编译、调试VC 6.0的项目,感觉很神奇,通过配置也让我们更进一步了解VC++ 6.0的编译器,连接器,调试器。好多兄弟问到要是能支持最新的VS2008和VS2010就好了,其实Code::Blocks已经配置好我们习惯的编译器的IDE环境了,假如我们用VS2003---VS2010,都可以不用配置了。只是因为VC++6.0的不在默认之列,所以才摸索 阅读全文
posted @ 2012-05-19 17:22 王耀it 阅读(667) 评论(0) 推荐(0) 编辑
摘要: 求子数组的最大和题目描述:输入一个整形数组,数组里有正数也有负数。数组中连续的一个或多个整数组成一个子数组,每个子数组都有一个和。求所有子数组的和的最大值。要求时间复杂度为O(n)。例如输入的数组为1, -2, 3, 10, -4, 7, 2, -5,和最大的子数组为3, 10, -4, 7, 2,因此输出为该子数组的和18。代码:int maxsum(int *a,int n){ int tmp=0; int max=0; for(int i=0; i<n; i++) { if(tmp<0) tmp=a[... 阅读全文
posted @ 2012-05-19 14:41 王耀it 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 原题:To the MaxTime Limit:1000MSMemory Limit:10000KTotal Submissions:31305Accepted:16272DescriptionGiven 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 the whole array. The sum of a rectangle is the sum of al 阅读全文
posted @ 2012-05-19 13:41 王耀it 阅读(214) 评论(0) 推荐(0) 编辑