← All problemsSign in

Simpul Koshan V2

You are given an array $A$ of size $N$ and $Q$ queries. Each array element is of type $(x_i,h_i)$ Each Query is of type $(l_i,r_i,h_i)$ after each query you remove elements of array with height $h_i$ and $l_i \leq x \leq r_i$ and print count of removed elements ###Input: - First line will contain $N$, size of array - next $N$ Lines will contain $(x_i,h_i)$ - next line will contain

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