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.
- 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: 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, Chaines de caractères, Calculs

Keep coding

Other challenges to complete

Intermediate
Harry Potter et le cours de potions

Harry Potter et le cours de potions

Harry et ses amis apprennent à réaliser de superbes potions qui font plein de dégâts !

Calculation
Beginner
STARSHIP #1 : Défense orbitale

STARSHIP #1 : Défense orbitale

Prêt pour une bataille spatiale ? Prends les commandes d’un vaisseau et protège ta planète !

Calculation
Beginner
Bug-out Shelter #5 – Outpost Surveillance

Bug-out Shelter #5 – Outpost Surveillance

Calculation Corrigé disponible : Javascript