As you secure the silence inside, Maxime sends you a batch of readings retrieved from the abandoned sensor network surrounding the military station. The data is incomplete, noisy, and sampled at irregular intervals — but it’s your only window into what the raiders are up to.
Your mission is simple and urgent: analyze these coordinates to determine the general direction and proximity of the threat relative to the station, and assess whether their trajectory is converging toward Promèthes. This estimation will immediately inform defensive priorities.
You are in a two-dimensional space, y and x. The values are expressed in kilometers.
You receive coordinates in the form of a grid composed of 5 lines.
Each line contains the following information:
Finally, you are given x and y, which are the coordinates of the military base.
You must find the shelters that are within a radius of 20 km or less from the military base, and return the number of shelters found and the X coordinates of the shelters located near the base, in the following format (without the braces):
{nb_shelters}:{shelter1_x},{shelter2_x},{shelter3_x}
Example:
5:22,7,18,36,29
challenge code for resolution via API: SHELTER_5
Some resources to help you:
Data and algorithmic logic Methodologies Corrections
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 progressDevelop 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!
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, Géométrie, Calculs
Other challenges to complete