Visual illustration of the code challenge: Greenoid #5 - A few more hours

Greenoid #5 - A few more hours

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

Mission

It's a lot to take in: rampant pollution, dwindling resources, rising tensions between tribes, and that cruel artificial intelligence. AURA won't give you a chance. Your entire civilisation is on the brink of extinction. You think of your families, your friends, and all those innocent people who have no idea for a minute that they are living their last moments. The countdown is now less than an hour and a half before the fatal outcome.

Don't panic, don't panic.

You absolutely must try to shift this infernal timer. Luckily your computer skills are as sharp as arrows in a bow. Ash notices that at the other end of the room are some robots that don't seem to be in use. Could they be used to slow down AURA's configuration and postpone the final ultimatum?

Rules

As you explore the system, you realise that the countdown is in fact linked to an internal calculation by AURA. The programme is working out its plan, how the different robots are going to go about resetting the planet (see challenge 3).

The robots are organised in different sequences, each sequence comprising different types of robot, in different organisations.

AURA calculates sequence by sequence. And you quickly work out that its calculation time depends on the type of robot:

  • A Preserve robot takes 1 min to calculate
  • A Heal robot takes 2 minutes to calculate
  • A Create robot takes 3 minutes to calculate
  • A Destroy robot takes 4 minutes to calculate

You'll also notice that some robots are stored and not used.

What if you added these unused robots to increase AURA's calculation time? That would certainly save you some time!

So you have at your disposal :

sequences: sequences in place that AURA has yet to calculate

storages: other stored, unused robot ‘sequences’ that you are going to add to the existing sequences

You need to find the longest possible ‘sequence’ + ‘storage’ combination for AURA to calculate and return a result in the form: ‘sequence + longest storage’_‘total calculation time in min’.

For example: DCCDCDCHHCDCDCPHD_52

Solve the challenge

To code this challenge, several possibilities:
- Want to start coding right away? Use the online Sandbox.
- You can also copy/paste a dataset below.

challenge code for resolution via API: GREENOID_5

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: Fonctions, ,

Keep coding

Other challenges to complete

Beginner
Jeux Olympiques – Plongeon

Jeux Olympiques – Plongeon

Comprends et programme le système de notation d’une épreuve de plongeon.

Calculation
Beginner
+3 Days ! Introduction

+3 Days ! Introduction

Tu décides d’analyser un fichier contenant une semaine complète de données…

Calculation Corrigé disponible : PHP
Beginner
Traversée 26 #1 First signals

Traversée 26 #1 First signals

Your agents are awaiting your instructions on the outskirts of Sector 26.
Calculation Corrigé disponible : TypeScript