题目链接: 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…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5247 找连续数 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1207 Accepted Submission(s): 435 Problem Description 小度熊拿到了一个无序的数组,对于这个数组.小度熊想知道能否找到一…
找连续数 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1008 Accepted Submission(s): 362 Problem Description 小度熊拿到了一个无序的数组,对于这个数组.小度熊想知道能否找到一个k 的区间,里面的 k 个数字排完序后是连续的. 如今小度熊添加题目难度.他不想知道是否有这种 k 的…
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…
敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 92235 Accepted Submission(s): 38868 Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了.A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这…
数列有序! Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 2 Accepted Submission(s) : 1 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description 有n(n<=100)个整数,已经按照从小到大顺序排列好,现在另外给…
题意:给定一组数,求最大的连续和,且输出开始与结尾 #include<iostream> #include<cstdio> using namespace std; int s[10011]; int main(){ int k,n,i,j,maxn,start,end; while(cin>>n,n){ maxn=-100; k= start = end = j = 0; for(i=0;i<n;i++){ scanf("%d",s+i);…
Revenge of Segment Tree Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1541 Accepted Submission(s): 552 Problem Description In computer science, a segment tree is a tree data structure for s…
最大连续子序列 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 18603 Accepted Submission(s): 8268 Problem Description 给定K个整数的序列{ N1, N2, ..., NK }.其随意连续子序列可表示为{ Ni, Ni+1, ..., Nj }.当中 1 <= i <= j…
Revenge of Segment Tree Problem Description In computer science, a segment tree is a tree data structure for storing intervals, or segments. It allows querying which of the stored segments contain a given point. It is, in principle, a static structur…
Edward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the array. Now Edward wants to know the summation of the beauty of all contiguous subarray of the array A. Input There are multiple…