C. Sereja and Brackets

Правка en1, от wish_me, 2018-01-21 18:58:12

I was trying to solve the problem http://codeforces.net/problemset/problem/380/C .I saw Segment tree approach in the editorials.Now I was thinking Can we do it by memoization.Increasing the value +1 for every "(".Now we have two options ,Whether we should include next character to close this subsequence on not.Initially it would be exponential but by doing memoization I think we can do this.Looking to hear from you guyz?????

Теги #dp

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский wish_me 2018-01-21 18:58:12 450 Initial revision (published)