How can I solve this problem.

Правка en1, от code_hard123, 2016-08-22 22:59:15

Given an array, and there are Q queries of two types.

Type-1 : given l , r , val

Update a[i] = a[i] xor val where i = [l , r]

Type-2 : given l , r

Return sum of a[i] where i = [l , r]

Can it be solved with segment tree with lazy propagation?

ThankYou :)

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский code_hard123 2016-08-22 23:01:46 6 Tiny change: 'be solved with segment t' -> 'be solved by segment t'
en1 Английский code_hard123 2016-08-22 22:59:15 301 Initial revision (published)