← All problemsSign in

The City of Trollampur

Problem description. You are the architect of City Trollampur. Trollampur has N buildings, ith building has a height of B[i] bricks. You have some X bricks leftover with you. You want to put those X bricks on some of the buildings.Attractiveness of the city is defined as the Height of the lowest building in the city.You can put X bricks on some of the towers and hence increase the attractivenes

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