About this problem

Правка en1, от Duelist1234, 2024-02-23 12:39:28

So the problem is as following: You are given two integers n and q , and there is an array length n with all zeroes. There are q operations of 3 types: -output the sum in array a from i to j; -a[i] becomes 1; -a[i] becomes 0.

I know this can be done using segment trees but I think that is complicating it.

Теги problem, segment tree

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Duelist1234 2024-02-23 12:39:28 333 Initial revision (published)