← All problemsSign in

The Space WAR

There is an all-out war going on in space and as we all know intel is important. You have a network of spies and you have gathered some valuable intel and want to send it to your soldiers as soon as possible, there are $N$ soldiers under your command. Some soldiers are in contact with each other and some are not. If a soldier has some information he/she will forward it to his neighbors in $1$ uni

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