Queries!
CodeChefOpen on judge ↗
Given $Q$ queries make a vector and perform the following functions. For each query you'll be given a single integer $K$. If: - $K=1$: Print The last element of the vector. - $K=2$: Add an element $X$ to the vector. - $K=3$: Delete the last element from the vector. ###Input: The first line of the input will have a single integer $Q$ i,e the no of queries. $Q$ lines follow each having an intege
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