Un cercle est un carré

misc algo FCSC 2025 solved on

star star

Description

Alice and Bob live on a unique planet: it is neither flat nor spherical—it is a cube! They want to optimize their wired connection on the surface to minimize the latency of their communications.

The cube has dimensions of 32×32×32, and the format of the points where Alice and Bob live is like [0,2,14] or [32,28,11]. We can see that these points are located on the surface of their planet.

To minimize wired communication, Alice and Bob need to find the shortest surface distance between a series of point pairs. To simplify calculations and keep only integer values, the goal is to compute the square of the shortest path distance (on the surface) between each pair of points.

Using the previous example, the expected minimum surface path distance between [0,2,14] and [32,28,11] would be 3789. This path passes through the point [13,0,0].

Note: The provided file, un-cercle-est-un-carre.py, contains the server-side code that handles the service. We do not provide the file minimum_distance.py. This file is referenced because it is used to check your answers: your objective is to write the function minimumDistanceOnCube.

Files

Author

Neige

Challenge Instructions

  1. First, download docker-compose.yml:
    curl https://hackropole.fr/challenges/fcsc2025-misc-un-cercle-est-un-carre/docker-compose.public.yml -o docker-compose.yml
  2. Launch the challenge by executing in the same folder:
    docker compose up
  3. Then, in another console, access the challenge with Netcat:
    nc localhost 4000
⚠️ Important: You must solve the challenge by interacting with the Docker container through the exposed network port. Any other way is not considered valid.

In case you encounter problems, please consult the FAQ.

Flag

Share my success on Fediverse, Twitter, Linkedin, Facebook, or via email.

Submit your solution

You can submit your writeup for this challenge. Read the FAQ to learn how to proceed.

You need to be logged in to submit a writeup.

Writeups

There are no public solutions for this challenge yet, but you can submit yours after getting the flag.