← All problemsSign in

Krillin is dead AGAIN

CodeChefRating 2526Open on judge ↗

Krillin has died yet again. Goku and Picollo must find a dragon ball in order to resurrect him. Kami gives them a quiz to solve in return for the dragon ball. He gives them an array $A$ (having 1 based indexing) of $N$ integers and he'll ask them $Q$ queries. The array is basically a frequency table which represents some data. It signifies that $i$ occurs $A[i]$ times in the data. The queries can

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