###### Maximum Product UVA - 11059（水题）

#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define inf 0x3f3f3f3f
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rep1(i,a,b) for(int i=a;i>=b;i--)
#define rson rt<<1|1,m+1,r
#define lson rt<<1,l,m
using namespace std;
const int N=100;
ll arr[N];
int n;
int main()
{
//ios::sync_with_stdio(false);
int n;
ll kase=0;
while(cin>>n)
{
rep(i,0,n)
cin>>arr[i];
ll mx=0;
for(int i=0;i<n;i++)
{
ll temp=arr[i];
mx=max(mx,temp);
for(int j=i-1;j>=0;j--)
{
temp*=arr[j];
mx=max(temp,mx);
}
}
cout<<"Case #"<<++kase<<": The maximum product is "<<mx<<"."<<endl;
cout<<endl;
}
return 0;
}

#### [UVA11059]Maximum Product[暴力]

2015-07-27 00:05:58

#### 最大乘积（Maximum Product，UVa11059)

2015-12-15 10:45:01

#### UVa 11059 - Maximum Product

2014-10-07 13:04:46

#### UVa 11059：Maximum Product（水题）

2015-09-04 12:38:59

#### UVA 11059 - Maximum Product

2016-04-30 23:39:52

#### UVA - 11059 Maximum Product

2014-09-18 13:24:36

#### UVa 11059 Maximum Product

2015-03-31 12:04:53

#### UVA - 11059( Maximum Product )

2017-04-12 12:43:33

#### UVA 11059 Maximum Product

2017-07-21 08:52:25

## 不良信息举报

Maximum Product UVA - 11059（水题）