### mahin661's blog

By mahin661, history, 7 weeks ago,

Got an interesting problem today in CSES.At first i was confused what to do then i got the logic in my mind. Here is the solution link you may check. Thank You Problem Link :https://cses.fi/problemset/task/1629/ solution link: https://github.com/skmahin661/Movie-Festiavlals-CSES.git

• 0

By mahin661, history, 2 months ago,

This is very intersting problem.I almost solved this problem correctly but i did a small mistake.Actually I solved this problem using prefix sum.First I calculated left sum then top to bottom sum.Then I print this , a[x2][y2]-a[x1-1][y2]-a[x2][y1-1].Sample test passed but wrong answer in hidden test cases. Then I thought more and got where I made mistake. Acctualy I forgot to add a[x-1][y-1].The acctual answer will be a[x2][y2]-a[x1-1][y2]-a[x2][y1-1]+a[x-1][y-1] For better understand, check this image first https://www.techiedelight.com/wp-content/uploads/Result.png Thank You

• +1

By mahin661, history, 3 months ago,

2 years of my coding journey and still thinking solving approach in noob way. Stuck in a very easy problem for 2 days, and not for single time I thought that if I count product of all elements then it will be overflowed! How noob I am!! spent more than 2 days on this easy problem!! What should I do now? Is it high time to give it up my coding journing? I am too tired.....

• +4