← All problemsSign in

Dakimakura Distribition

CodeChefRating 3010Open on judge ↗

Only a few centuries later, the Berland government realized what was necessary for the country's prosperity. That's right, a dakimakura for every resident of Berland! It is known that Berland consists of $N$ cities, where $C_i$ people live in city $i$ and it takes $T_i$ hours to get from city $i$ to city $i + 1$. The government is ready to allocate $x$ tugriks for the implementation of the proje

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