About this problem

Revision en1, by 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.

Tags problem, segment tree


  Rev. Lang. By When Δ Comment
en1 English Duelist1234 2024-02-23 12:39:28 333 Initial revision (published)