爱嘉牛LA

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2012年10月23日

摘要: View Code #include<iostream>using namespace std;int maxleft=0,maxright=0;//记录最大字段和起点和终点 int MaxSubsum(int *a,int left,int right){ int sum=0; if(left==right) sum=a[left]>0?a[left]:0; else{ int center=(left+right)/2; int leftsum=MaxSubsum(a,left,center); int right... 阅读全文
posted @ 2012-10-23 22:28 爱嘉牛LA 阅读(655) 评论(0) 推荐(0) 编辑