Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Please Help me in understanding why we use Random in the question

Правка en1, от joseph_goldberg, 2021-10-12 16:36:49

I know 2-D segment tree and 2-D Fenwick tree and I have used them. I was trying to solve the problem 869E - The Untended Antiquity . In this question, I understood the whole core logic of 2-D Fenwick tree but I couldn't understand why we use random instead of that if I use count=0 like assigning count for one boundary then I increment the count and assign that count to another boundary and so on. I tried this approach and I got the wrong answer on Test Case 9 but it was too large that I couldn't see what the test case was. So, if you can tell me why we use random numbers it will be helpful.

Теги 2d fenwick tree, help me, understand

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский joseph_goldberg 2021-10-12 16:36:49 647 Initial revision (published)