Pagini recente » Cod sursa (job #1596180) | Cod sursa (job #2650567) | Diferente pentru problema/prieteni2 intre reviziile 10 si 9 | Diferente pentru implica-te/arhiva-educationala intre reviziile 223 si 201 | Diferente pentru blog/square-root-trick intre reviziile 95 si 94
Nu exista diferente intre titluri.
Diferente intre continut:
The query is interesting. The elements of the first and last slice (partially contained in the queried range) have to be traversed one by one, but for slices completely contained in our range we can use the values in $S$ directly and get a performance boost.
p. Here is an update example:
!{margin-right: 20px; auto;display:block;}blog/square-root-trick?image01.png!
!<{margin-right: 20px; auto;display:block;}blog/square-root-trick?image01.png!
p. In $update(6, 5)$ we have to change $A[6]$ to 5 which results in changing the value of $S[1]$ to keep $S$ up to date.
!{margin-right: 20px; auto;display:block;}blog/square-root-trick?image00.png!
!<{margin-right: 20px; auto;display:block;}blog/square-root-trick?image00.png!
In $query(2, 14)$ we get <tex>A{2} + A{3}</tex> <tex> + (A[4] + A[5] + A[6] + A[7]) + (A[4] + A[5] + A[6] + A[7]) + A[12] + A[13] + A[14] = A[2] + A[3] + S[1] + S[2] + A[12] + A[13] + A[14] = 0 + 7 + 11 + 9 + 5 + 2 + 0 = 34</tex>
Nu exista diferente intre securitate.
Topicul de forum nu a fost schimbat.