HELP NEEDED IN DIGIT DP PROBLEM

Revision en4, by hiddenanonymous, 2021-06-05 22:17:06

Problem : https://www.spoj.com/problems/COOLNUMS/
My dp states : dp[N][partition_1_sum][partition_2_sum][2]
but this is incorrect as we also have to keep track of the order in which numbers are added i guess. can someone tell me what's the approach and how have you implemented it?
My code : https://ideone.com/qw85QZ

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English hiddenanonymous 2021-06-05 22:17:06 71
en3 English hiddenanonymous 2021-06-05 22:13:41 3 Tiny change: 'ion_2_sum] <br>\nbu' -> 'ion_2_sum][2] <br>\nbu'
en2 English hiddenanonymous 2021-06-05 22:13:17 11
en1 English hiddenanonymous 2021-06-05 22:13:01 359 Initial revision (published)