ENG
RUS
Timus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board
Discussion of Problem
1330
. Intervals
Different approaches to solve the task
Posted by
mberdyshev
28 Feb 2017 05:09
1. Segment tree.
2. Fenwick tree.
3. Partial sums (b[i] = SUM(a[0], ..., a[i])).
4. Sqrt decomposition.
Hope, it helps to understand how to solve this task.
Edited by author 28.02.2017 15:25
© 2000–2024
Timus Online Judge Team
. All rights reserved.