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

Автор tuncypasha, история, 10 месяцев назад, По-английски

Given an integer $$$n$$$, the next line contains $$$n$$$ integer. Third line contains an integer $$$q$$$. The next $$$q$$$ lines, contains $$$q$$$ queries. Query format is $$$l_i$$$, $$$r_i$$$. You have to answer to queries like this. If all the numbers that are less or equal than its index, that is, $$$a_l$$$ $$$≤$$$ $$$0$$$, $$$a_{l + 1}$$$ $$$≤$$$ $$$1$$$, $$${...}$$$, $$$a_r$$$ $$$≤$$$ $$${r - l}$$$.

Constraints are $$$n$$$ $$$≤$$$ $$$2 ⋅ {10 ^ 5}$$$, $$$q$$$ $$$≤$$$ $$$2 ⋅ {10 ^ 5}$$$.

Can you help me to solve this problem?

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

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

Auto comment: topic has been updated by tuncypasha (previous revision, new revision, compare).

»
10 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится +1 Проголосовать: не нравится

.

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

Can you give constraints on values of the $$$n$$$ integers $$$a_1,a_2,...,a_n$$$ ? (upper + lower bound)