← All problemsSign in

Query on Array

In this problem, you will be given an array $A$ of size $N$. The array will be *0-indexed* and each element of the array will be a positive integer not greater than $9$. You will be asked $Q$ queries on this array. In each query you will be given 3 integers $l,r,x$. You have to determine if the element *x* is present in the range $A[l],A[l+1]....A[r]$ ###Input: - First line of each test case c

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start