Visual illustration of the code challenge: Bug-out Shelter #8 – The Final Push

Bug-out Shelter #8 – The Final Push

Coding in the sandbox You must be logged in to access the sandbox.

Mission

The heavy calm that reigned over Promèthes is broken by a series of internal alerts: the peripheral sensors have just detected several fast-moving thermal signatures. The raiders have figured out the ruse and are closing in, guided by the last traces of the fake signal.

This time, there's no room for escape or concealment. The assault is imminent.
Zoé is coordinating the automated defenses, while Maxime manages system monitoring and power supply. Everything must be calculated, synchronized, and executed in absolute silence — a single mistake could reveal your exact position and doom the shelter.

Your mission is simple but crucial: analyze the latest approach data to optimize the distribution of defenses, anticipate impact zones, and trigger countermeasures at the precise moment the attackers reach the perimeter.
Promèthes must not only survive — it must prove that silence can strike harder than noise.

Rules

The raiders’ assault will last 12 minutes.

You have at your disposal 12 defense and protection systems, contained in the variable systems.

Each system is described as follows:

  • A letter representing it, from A to L
  • An energy cost
  • A binary sequence showing its operation: a 1 means the system is active, a 0 means it is not active (on standby, recharging, etc.)

Example:
A:3:110010001010
→ System A costs 3 units of energy and can be active at minutes 0, 1, 4, 8, and 10

Your objective is to select the systems to activate so that each minute is covered at least once by a system, while minimizing the total energy cost.

If you activate too many systems at once, the shelter might not withstand the load, which would cause a total shutdown — leaving Promèthes at the mercy of the raiders!

You must return the selected systems that achieve the minimum energy cost for full coverage.

Example:

BDEG or AJI

Solve the challenge

To code this challenge, several possibilities:
- Want to start coding right away? Use the online Sandbox.
- Want to work in your favorite editor? Organize your code well, test, check out our API documentation.
- You can also copy/paste a dataset below.

challenge code for resolution via API: SHELTER_8

Some resources to help you:
Data and algorithmic logic Methodologies Corrections

Support for resolution

Progress through challenges using our resolution aids: tools, techniques and advice to help you overcome the most complex programming challenges with methodology, confidence and creativity.

Dataset and algorithmic logic

Based on the data and the expected response, use the process to determine the logic to implement.

Show data and progress

Methodologies

Develop a structured approach with our solving guides. Work on specific concepts such as object-oriented programming or unit testing to improve your coding style and progress.

No methodology yet for this challenge, but we are working on it! Follow us to be informed of the release!


Corrections

The corrections allow you to discover certain technical concepts but will also give you a solution to the challenge. Code the challenge yourself before consulting the corrections ;)

Programming concept(s) that can be used to solve this challenge: Conditions, Tableaux, Booléens, Fonctions, Parsing, Calculs

Keep coding

Other challenges to complete

Intermediate
Jeux Olympiques – Tableau des médailles

Jeux Olympiques – Tableau des médailles

Bientôt les jeux olympiques de Paris 2024 ! Vérifie le fonctionnement du tableau des médailles.

Behavioral Corrigé disponible : PHP
Beginner
Greenoïd #3 - An alternative reality

Greenoïd #3 - An alternative reality

Behavioral Corrigé disponible : Python
Intermediate
WALL-E #1

WALL-E #1

Wall-E est un robot dont la mission est de nettoyer la Terre. Tu dois coder son fonctionnement pour qu’il traite efficacement ces déchets. Néanmoins, sois vigilant pour ne pas épuiser sa réserve d’énergie !

Behavioral Corrigés dispos : PHPPHP