Visual illustration of the code challenge: Bug-out Shelter #6 – Misleading Transmission

Bug-out Shelter #6 – Misleading Transmission

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

Mission

The verdict is clear: the raiders are closing in — and they now know that a fully functional shelter is hidden somewhere nearby. Promèthes.

You have only one option left: mislead them.

Maxime suggests a risky maneuver — deliberately broadcasting false data using signal fragments recovered from the military base. The goal is to generate an artificial echo: a radio or energy signature convincing enough to make them believe the shelter is located somewhere else.

The decoy must be credible. The coordinates, signal strength, emission frequency… everything must look authentic, without exposing Promèthes. One miscalculation, and the shelter’s cover is blown.

Rules

We are still in a two-dimensional space, x and y, expressed in meters.

You have at your disposal the x and y coordinates of three sensitive zones of the Promèthes shelter: the shelter entrance, a ventilation tunnel, and a waste evacuation tunnel.
Each zone is represented in the format x,y in the variables z1, z2, and z3.

You also have encrypted coordinates of raider squads located not far from the shelter.
To push them away, you must send them fake coordinates, which will move them 100 meters away from the closest sensitive zone (100 meters on the X axis and 100 meters on the Y axis, not 100 meters diagonally).

Depending on where the squad is located, you must push it in the opposite direction from the zone’s position (to move it as far away as possible).
You do not need to take into account whether the squad might be redirected toward another sensitive zone.

For each coordinate, you must:

  • Decrypt the coordinates
  • Determine the coordinates to send in order to move the squad away
  • Encrypt the coordinates

You must return all the encrypted coordinates, separated by dashes.

Example input

[280_243, 159_2eb, f4_173]

Example output:

2e4_2a7-f5_34f-90_10f

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_6

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: Grille 2D, Conditions, Tableaux, Géométrie, Cryptographie, Calculs

Keep coding

Other challenges to complete

Intermediate
Survie sur une île déserte #2

Survie sur une île déserte #2

Parcours une île déserte à la recherche d’eau et de nourriture…

Behavioral Corrigé disponible : PHP
Beginner
Greenoïd #1 - An unexpected encounter

Greenoïd #1 - An unexpected encounter

With your friends Hazel and Ash, you happen to come across an old robot…
Behavioral Corrigé disponible : PHP
Beginner
CodeMind #1 : Émotions

CodeMind #1 : Émotions

Commence le premier challenge de CodeMind : utilise l’analyse du langage naturel pour reconnaître les émotions.
C’est parti pour Top Code 2024 !

Behavioral