find how many time K occurs in subsequence a[l]...a[r]

Правка en2, от ATofighi, 2016-01-26 14:38:20

Hi,

Can anyone help me with this problem?

You are given an array with n integers a1, a2, ..., an , a integer K and m queries.

There are two types of query:

  1. give you two integers l and r and ask you how many integers of al, al + 1, ..., ar are equals to K.

  2. give you three integers l, r and v and ask you to add the value of al, al + 1, ..., ar by v.

Теги algorithms, data structures, sqrt-decomposition

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский ATofighi 2016-01-26 14:55:24 9 Tiny change: ' to print number of' -> ' to print how many number of'
en3 Английский ATofighi 2016-01-26 14:45:41 140 (published)
en2 Английский ATofighi 2016-01-26 14:38:20 17 Tiny change: 'tegers $a_i$ , a inte' -> 'tegers $a_1, a_2, ..., a_n$ , a inte'
en1 Английский ATofighi 2016-01-26 14:37:12 449 Initial revision (saved to drafts)