Subway Lines
CodeChefOpen on judge ↗
One day, Flippy the bird is travelling around the city using the subway lines. There are n cities in town and m pairs of cities are connected by a subway line. Each subway line is operated by a company, ti. Flippy lives in city s, and wonders what is the minimum cost for him to get from s to other cities. Each subway line has a cost ci. This means that Fluffy has to pay ci coins to use the subway
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