← All problemsSign in

Query game

You are given the following two kinds of queries: * 1 x - where 1 stand for a query of type 1 and x is an integer digit which needs to be inserted into a list. * 2 k - where 2 stands for a query of type 2 and k is an integer. For every query of type 2, you will have to print the product of the last k numbers in the list. it is guaranteed that every time a query of type 2 is passed, the

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