← All problemsSign in

Mumbai N00B

The rail system in Mumbai has changed. Now, you can buy a ticket from a station, and go to another station, if there are exactly K tracks on the route, and the route passes through a particular station. You are given N, the number of stations in Mumbai. The number M denotes how many tracks there are in the system. You are also given M pairs of integers, Ai and Bi, denoting that there is a track fr

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