_AhSaN_'s blog

By _AhSaN_, history, 3 hours ago, In English

Hello everyone,

I have been struggling with a problem(this) for several hours and have not yet found a solution. I came across a suggestion that this problem can be addressed using a 2D Binary Indexed Tree (BIT). While I understand the underlying logic of how to implement this approach, I am encountering a Memory Limit Exceeded (MLE) error.

The issue seems to stem from the inability to declare a 2D array of size [n][n]. Therefore, I would like to know how we can effectively utilize a 2D BIT without running into memory issues. Alternatively, are there other methods to solve this problem that I might explore?

I am eager to learn and would greatly appreciate any guidance or insights you can provide. Thank you in advance for your help!

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