Why Does My Bottom-Up DP Solution Fail?

Правка en1, от coco_elon, 2016-09-24 01:59:19

I found this question in Codeforces Round #373 (Div. 2).

http://mirror.codeforces.com/problemset/problem/719/B

My solution:

https://ideone.com/RYOQkS

Can someone please help me find why my solution fails and how to correct it accordingly?

Thanks in advance!

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский coco_elon 2016-09-24 01:59:19 304 Initial revision (published)