Does This problem required knowing Segment Tree Beats ?

Revision en1, by Duukh, 2023-06-26 18:09:14

Guys does this problem required Segment Tree Beats to solve it ? ================================================================ Given an array of size n <= 10^5 initially filed with zeros, answer two types of queries:

1 A B C : Perform the following operation arr[i] = max(arr[i],C) , where i = A (MOD B) and 1 <= i <= n .

2 I : Print value arr[I] .

Constraints : 1 <= A < B <= N and C <= 10^9

1 <= I <= N .

1 <= n , q <= 10^5 .

Tags segment tree, range query, query, segment tree beats

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English Duukh 2023-06-27 13:07:42 130
en2 English Duukh 2023-06-26 18:10:11 3 Tiny change: '========== \nGiven a' -> '==========\n \nGiven a'
en1 English Duukh 2023-06-26 18:09:14 516 Initial revision (published)