Practice · 4 of 6
Budget: interleaved min queries
CHALLENGE
Difficulty: advanced+25 XP
**Tình huống.** n ≤ 200000. Interleaved: 1 i x sets a[i] = x; 2 l r prints min a[l..r].
**Thuật toán nào phù hợp nhất? Chương trình chỉ cần in ra chữ cái.**
**A)** Recompute min per query (O(nq))
**B)** Sparse table (static only)
**C)** Segment tree with point update, O((n+q) log n)
**D)** Sort and prefix sums
Press Submit to check your solution.
Back to lesson: Practice: Budget Drill Set