intmain(){longlongintnum,data,max=1,round=0;vector<int>v;vector<longlongint>Max;while(cin>>num){round++;for(inti=0;i<num;i++){cin>>data;v.push_back(data);}for(unsignedinti=0;i<v.size();i++){for(unsignedintj=0;j<v.size()-i;j++){for(unsignedintk=i;k<v.size()-j;k++){max=max*v[k];//brute force}Max.push_back(max);max=1;}}sort(Max.begin(),Max.end());//由小排到大if(Max[Max.size()-1]<0)//最後一個如果是負數就變0{Max[Max.size()-1]=0;}//印出最大的那個數字 cout<<"Case #"<<round<<": The maximum product is "<<Max[Max.size()-1]<<'.'<<endl<<endl;v.clear();Max.clear();}return0;}