mahin661's blog

By mahin661, history, 6 months ago, In English

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

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By mahin661, history, 7 months ago, In English

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

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it

By mahin661, history, 7 months ago, In English

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.....

Full text and comments »

  • Vote: I like it
  • +4
  • Vote: I do not like it