TLE on EDU Round 144 Problem D

Правка en1, от SAT2020, 2023-03-02 06:50:17

Can anyone please help me understand why my code gives TLE?

https://codeforces.me/contest/1796/submission/195509093

I basically followed the editorial exactly but used memorization instead of bottom-up.

In general, is bottom-up faster, or is my implementation just flawed?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский SAT2020 2023-03-02 06:50:17 312 Initial revision (published)