Segment Tree Problem from SPOJ, SEGSQRSS — Sum of Squares with Segment Tree

Правка en2, от Tobby_And_Friends, 2016-10-21 22:52:23

Problem Link: http://www.spoj.com/problems/SEGSQRSS/

While I do understand that the merge operation can be deduced from the equation (a + b)^2 = a^2 + b^2 — 2ab I could not specifically figure out how would I formulate the merge operation. Any help is really appreciated.

Теги spoj, segment tree

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Tobby_And_Friends 2016-10-21 22:52:23 58 Tiny change: 'While I do' -> 'Problem Link: http://www.spoj.com/problems/SEGSQRSS/\n\nWhile I do'
en1 Английский Tobby_And_Friends 2016-10-21 22:05:32 299 Initial revision (published)