Poker Chips
CodeChefOpen on judge ↗
Chefu and his friend Sand are bored because their cell phones are dead. To overcome the boredom, Sand devised a game with some numbered poker chips. Sand initially makes a tower of $N$ chips (a1 ,a2 ,a3 ....aN where aN is on the top) known to Chefu. After that Sand gives Q queries which arre of two types. - 1 L s1 s2 ...sL Put L chips numbered s1- sL to the tower(sL at the top) - 2 R Remove R
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