You are given an array of integers A of size N and 3 integers l, m, n. Your task is to find the maximum value of the given function: f(i,j,k)=l∗Ai+m∗Aj+n∗Ak:1≤i≤j≤k≤N
First line contains 4 integers N,l,m and n
Second line contains N space separated integers A1,A2,...,An
A single integer denoting the maximum value of the function
1≤N≤105
−109≤l,m,n≤109
−109≤Ai≤109∀1≤i≤N
On choosing values of i,j,k as 5 we can get the max value 1∗5+2∗5+3∗5=30