Блог пользователя Mujh_lui

Автор Mujh_lui, история, 8 лет назад, По-английски

How to find the number of contiguous subsequences in a given range ?

Example :

4 (N)

1 2 3 4 (array[i])

2 4 (Query)

Need to find the number of contiguous subsequences from 2 to 4 whose value is a perfect square.

Explanation :

{ 2 & 3 & 4 } = 0 (Perfect Square)

{ 3 & 4 } = 0 (Perfect Square )

{4 } = 4 (Perfect Square )

Range:

N <=10^5 Q<=5*10^5 (Query)

  • Проголосовать: нравится
  • -29
  • Проголосовать: не нравится

»
8 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Wait for codechef sept18 long challenge to get over. ANDSQR
Our Editorialist : vijju123 will answer all your question once contest gets over.