Start Instructions Leaderboard Testing Queue Register Login

Instructions for building a container

First start with a problem a small problem (0.9MB) and a small solution (0.6MB) file that you can test your code.

Later you can then try it with the big files:

Actually building the container

The problem and solution files will be mapped under `/eeec/problem.json` and `/eeec/solution.json` respectively.
The solution.json will be empty, so your program can fill it out.

I recommend to use a multistage build for compiled languages like rust to keep the final container small.

When using an interpreter, using a minimized container for that specific runtime/language is probably best.

In any case, try to remove cached files before uploading the container.

How the challenge is structured

There are multiple Streams of problems to solve inside of the `problem.json`.
Within one problem stream, the operations depend on the order (for math reasons 😉).

A stream has one of the following json structures
SimpleMathOps + StringConcatOps => {"type":[TYPE],"stream_id":[ID], "operation":[OPERATION],...}, ZeroPolyOps => {"type":[TYPE],"stream_id":[ID], ... },

    Possible [TYPE]: 
    - StringConcatOps (stream id: 16 to 63 )
    - ZeroPolyOps (stream id: 64 to 127)
    - SimpleMathOps (stream id: 0)

    [ID]:
    - stream id (collerates to problems Types)

    Possible [OPERATION]
    - SimpleMathOps: Add, Sub, Mul, Div
    - StringConcatOps: Append, Prepend, InsertInMiddle, NoOp
      

Shortened problem.json

[
    {
        "type": "StringConcatOps",
        "stream_id": 42,
        "operation": "Append",
        "data": "the 0-th"
    },
    {
        "type": "StringConcatOps",
        "stream_id": 42,
        "operation": "NoOp",
        "data": "some data we ignore"
    },
    {
        "type": "ZeroPolyOps",
        "stream_id": 109,
        "formula": "-11.819792584042874x^2 +4.3501729268447455x -8.603376088784302"
    },
    {
        "type": "SimpleMathOps",
        "stream_id": 0,
        "operation": "Div",
        "lvalue": 4278.465524421099,
        "rvalue": 3241.091787993921
    },
// more similar input
]
    

Shortened solution.json

[
    {
        "sum": -2621.77689364967,
        "n_entries": 3
    },
    null,
// more  nulls
    {
        "string_concat": "the 1-ththe 2-th"
    },
// more nulls
    {
        "string_concat": "the 0-th"
    },
// more nulls
    {
        "n_zero_points": 0
    },
    {
        "n_zero_points": 2
    },
// more nulls
    {
        "n_zero_points": 0
    }
]
    
You have to parse the file and calculate the following:
Note that unused streams must be represented as `null` in the JSON - SimpleMathOps

Stream 0

Keep the order of the operations (for math

        let operation = [
            SimpleMathOpsOperation::Add,
            SimpleMathOpsOperation::Sub,
            SimpleMathOpsOperation::Mul,
            SimpleMathOpsOperation::Div,
        ];
        SimpleMathOps {
            stream_id: 0,
            operation,
            lvalue: rng.gen_range(0.0..10240.0),
            rvalue: rng.gen_range(0.0..10240.0),
        }

        interface SimpleMath {
            sum: number;
            n_entries: number;
        }
    
- ZeroPolyOpsStringConcatOps

Stream 16 to 64

Keep the order of the operations

        let operation = [
            StringConcatOpsOperation::NoOp,
            StringConcatOpsOperation::Append,
            StringConcatOpsOperation::Prepend,
            StringConcatOpsOperation::InsertInMiddle,
        ];
        StringConcatOps {
            stream_id: rng.gen_range(16..64),
            operation,
            data: format!("the {i}-th"),
        }

        interface StringConcat {
            string_concat: string;
        }
    
- ZeroPolyOps

Stream 64 to 128

Count the amount of roots of the polynomial (german: Nullstellen) per stream_id

        ZeroPolyOps {
            stream_id: rng.gen_range(64..128),
            formula: format!("{}x^2 {:+}x {:+}", a, b, c),
        }

        interface ZeroPoly {
            n_zero_points: number;
        }