Please Help me to debug the code

Problem Link : https://atcoder.jp/contests/dp/tasks/dp_l

My solution Link: https://ide.codingblocks.com/s/343784

I don’t know why i am getting index out of bound error please help me out.I have just shifted to python from c++ so i am struggling a bit so please help.

Modified Code Link : https://ide.codingblocks.com/s/343840

please help me to debug the modified code link


fixed it here

hey the code which you have fixed is not getting accepted by atcoder can you please look into it.

I have modified the code to initialize the dp efficienctly please debug this modified code.

Modified Link: https://ide.codingblocks.com/s/344434

Hey, I focused on fixing the syntax bugs, since the solution was already provided as a video solution, I’ll have a look again

This code for the modified link isn’t working, I mean the link is not working, can u recheck

Link is working i am able to see the code.