← All problemsSign in

War Time

A neighboring clan has decided to attack Lacha's clan. There are lot of preparation, that Lacha need make in order to save his clan. And he also do not want to lose all of his army in the war. You being a computer scientist in clan's army improvisation laboratory is asked to calculate average strength of army formed by selecting K groups with maximum and minimum strength. Input The first lin

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