← All problemsSign in

Bus Routes

The Kingdom of Kharagpur has **N** cities, which are numbered from **1** to **N**. There are many bus routes which go directly from one city to another. A bus route from **City i** to **City j** does not mean that there is a route from **City j** to **City i**. Yesterday, the King had a dream, and he has decided that for the country to become prosperous, in every city, the number of bus routes co

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