Can anyone tell me how to optimise my O(N) dp solution

Правка en1, от practice_account, 2020-06-28 02:06:04

Question — 1221D - Make The Fence Great Again My submission — 85248917 I have written a O(N) dp solution still it does not pass the 17th testcase. I have seen the editorial which also has a O(N) solution. Can anyone please tell me where am I doing the extra work here.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский practice_account 2020-06-28 02:06:04 330 Initial revision (published)