beowulf's blog

By beowulf, history, 7 years ago, In English

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.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By beowulf, history, 7 years ago, In English

I am stumped on 29958547. What is the error in the code which hasn't been discovered till test case 15. If the entire approach is wrong, please don't reveal the the correct approach, just say that the approach is wrong. However if a silly error has been committed please point it out.

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it