Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the largest product = 6. 这个求最大子数组乘积问题是由最大子数组之和问题演变而来,但是却比求最大子数组之和要复…
最大乘积 题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=84562#problem/B 题意: 输入n个元素组成的序列s,你需要找出一个乘积最大的连续子序列.如果这个最大的乘积不是正数,应输出0. 注意格式. Sample Input32 4 -3 52 5 -1 2 -1 Sample OutputCase #1: The maximum product is 8. Case #2: The maximum product…