What is the mistake?

Revision en1, by beowulf, 2017-09-25 02:33:29

The 30692159 gives an error on test 9; if anyone can point out the mistake in the code i'd grateful.

Working:

I first formed an array that stores the maximum value of the input numbers upto the current index.

I then formed an array that stores the maximum value of p*ai+q*aj for a particular j.

Tags error, wrong answer

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English beowulf 2017-09-25 02:33:29 345 Initial revision (published)