Ankit and Cricket
CodeChefOpen on judge ↗
Ankit has to submit his assignment given by his master. But Ankit's friends are calling him again and again to play cricket, and Ankit couldn't resist himself from playing cricket. So could you help him solving the problem? Formally, you are given a sequence of $N$ positive integers: $B=(B_1,B_2,B_3,B_4,...,B_n)$ and $Q$ Queries. In the $ith$ query, $(1 \leq i \leq Q)$, given a positive integer
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.
Sign in to chat with the tutor and save your progress.
Sign in to start