题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1003 Max Sum Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) 问题描述 Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For e…
Max Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 292444 Accepted Submission(s): 69379 Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max s…
HDU 1003(A - 最大子段和) 题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87125#problem/A 题目: Max Sum 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,-…
HDU1003 HDU1231 题意自明.可能是真的进步了点,记得刚开始研究这个问题时还想了好长时间,hdu 1231还手推了很长时间,今天重新写干净利落就AC了. #include<iostream> #include<cstring> #include<cstdio> #include<algorithm> using namespace std; ; int a[MAXN]; int main() { int T,N; scanf("%d&q…
题目: Max Sum Plus Plus Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 27299 Accepted Submission(s): 9499 Problem Description Now I think you have got an AC in Ignatius.L's "Max Sum" prob…
题目描述 给出一个长度为 n 的序列,要求支持如下两种操作: A l r x :将 [l,r] 区间内的所有数加上 x : Q l r : 询问 [l,r] 区间的最大连续子段和. 其中,一个区间的最大连续子段和指的是:该区间所有子区间的区间和中的最大值(本题中子区间包括空区间,区间和为 0 ). 输入 第一行两个整数 n.m,表示序列的长度以及操作的数目. 之后的 m 行,每行输入一个操作,含义如题目所述.保证操作为 A l r x 或 Q l r 之一. 对于 3…
Max Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 154155 Accepted Submission(s): 35958 Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max su…
Max Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 135262 Accepted Submission(s): 31311 Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max s…
题目(1231) #include<stdio.h> #include<iostream> using namespace std; int main() { int K,num[10010],cnt; int end,start,thisMax,Max,temp; while(cin>>K&&K) { cnt=0; for( int i=0; i<K; i++) { scanf("%d",&num[i]); if(nu…
HDU1003 Problem 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 = 14. Input The first line of the inpu…
Max Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 204780 Accepted Submission(s): 47877 Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max su…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1003 Max Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 158421 Accepted Submission(s): 37055 Problem Description Given a sequence a[1],a[2]…