Better complexity of Codechef Paying Up

Revision en1, by div24ever, 2015-12-26 18:18:17

Problem link

I have done this problem with time complexity O( nlogn + n * m ) and space complexity O( 2 * m ). How can i improve this?

Tags codechef, subset sum, dynamic programming, complexity

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English div24ever 2015-12-26 18:18:17 221 Initial revision (published)