ak3899's blog

By ak3899, history, 6 years ago, In English

i recently read about the "meet in the middle" technique for solving sub array sum problems in O((2^(n/2)).log(2^(n/2)) so i tried to solve this codeforces problem using this technique but not able to understand how to select the value of K so that sum till ak become sum<=k .. problem link : E. Maximum Subsequence::

my wrong solution link how to correct it ?

https://ideone.com/Pg6BJO

please help!!

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