Does This problem required knowing Segment Tree Beats ?

Правка en2, от Duukh, 2023-06-26 18:10:11

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 .

Теги segment tree, range query, query, segment tree beats

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский Duukh 2023-06-27 13:07:42 130
en2 Английский Duukh 2023-06-26 18:10:11 3 Tiny change: '========== \nGiven a' -> '==========\n \nGiven a'
en1 Английский Duukh 2023-06-26 18:09:14 516 Initial revision (published)