#include int max_adj(int a[], int len){
int sum=0, max = a[0];
int i=0;
for (;i max) {
max=sum;
}...
分类:
其他好文 时间:
2015-08-12 13:21:02
阅读次数:
154
DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the ma...
分类:
其他好文 时间:
2015-08-11 18:12:54
阅读次数:
104
DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the ma...
分类:
其他好文 时间:
2015-08-11 09:52:04
阅读次数:
111
Description
Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 = 1...
分类:
其他好文 时间:
2015-08-10 22:14:59
阅读次数:
163
A -最大子段和Time Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uDescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calcula...
分类:
其他好文 时间:
2015-08-10 22:05:33
阅读次数:
123
DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the ma...
分类:
其他好文 时间:
2015-08-10 21:53:03
阅读次数:
135
题目传送门 1 /* 2 题意:求最大连续子序列和及两个端点 3 累积遍历算法 O(n):依照sum14 #include 15 #include 16 #include 17 #include 18 #include 19 #include 20 #include 21 #incl...
分类:
其他好文 时间:
2015-08-10 19:58:08
阅读次数:
109
等差数列: 以k为首相,k为公差,w个数量的和与n的大小关系 输出max(sum-0,0) Java程序 import java.util.Scanner; public class A546 { static void run(){ Scanner in = new Scanner(System....
分类:
其他好文 时间:
2015-08-09 20:27:01
阅读次数:
194
Max Sum
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 178139 Accepted Submission(s): 41558
Problem Description
Given a sequenc...
分类:
其他好文 时间:
2015-08-07 20:09:22
阅读次数:
108
??
#include
#include
#include
using namespace std;
int main()
{
int t;
scanf("%d",&t);
for(int i=0;i
{
int n;
scanf("%d",&n);
int sum=0,max=-99999...
分类:
其他好文 时间:
2015-08-06 22:35:42
阅读次数:
229