#include using namespace std; int main() { long int i,j,tm,n,tot=0,tots=0,req=0,reqs=0,cnt=0; long int *a; long int max = 0; cin>>n; a = (long int *)malloc(sizeof(long int) * n); for(i=0;i>a[i]; for(i=0;i tm) tm = a[j]; req = tm *(tm + 1) /2; reqs = tm *(tm + 1)*((2* tm) + 1) /6; cout<<" --------------------- REQ 1s :"<< req << " 2s :"<< reqs < max) max = cnt; } else break; } } } cout<<"MAX :: "<