Скоро Codeforces Round 1133 (Div. 1, Div. 2)! Регистрация здесь. ×

need help for meet in the middle technique problem .

Правка en2, от ak3899, 2018-07-29 16:58:45

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!!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский ak3899 2018-07-29 16:58:45 37
en1 Английский ak3899 2018-07-29 16:57:40 511 Initial revision (published)