Question : “CSES - Range Updates and Sums ”
My code : “4nRq25 - Online C++0x Compiler & Debugging Tool - Ideone.com ”
I know how to do range update and range query both operations using BIT (as above solution) , but in above question type 2 query says to set value ‘c’ to each index i which is lie between a to b . How can I do this ?
@ssjgz @rahulmysuru7 @navjeet0 @carre @udayan14 @galencolin @tmwilliamlin
I know how to increment by X in range from L to R , but how can I set X in range from L to R using BIT ?
I am seeing type 2 queries first time , I don’t think type 2 is BIT.
1 Like
Means not solvable by BIT , fr apna kaam khallas
Segment Tree , I saw already , but i wanna solve using BIT if possible
carre
September 15, 2020, 6:49pm
7
I would definitely go for a Seg Tree; maybe there’s a way of doing it using a couple of BITs but I don’t see any straightforward solution
2 Likes
But if possible please think