Ad
  • Custom User Avatar

    Language: C++
    Test suit missing the required header std::list

  • Custom User Avatar
  • Default User Avatar

    C and NASM translations. Please review.

  • Custom User Avatar

    It would be better to hardcode the correct result in the training test.

    Since I see how the validation works, I can abuse it.

    For now, simply returning an empty array completes all the tests.

  • Default User Avatar

    The random tests are only "random" in the aspect of shuffling, but this does not circumvent that a solution would hard-code the answer, since it is always the same answer that has to be provided, independent on how the input was shuffled.

    Currently, one can pass all the tests with this code:

    return [
            [
                "Departure" => "Madrid",
                "Arrival" => "Barcelona",
                "Transportation" => "Train",
                "TransportationNumber" => "78A",
                "Seat" => "45B"
            ],
            [
                "Departure" => "Barcelona",
                "Arrival" => "Gerona Airport",
                "Transportation" => "Bus"
            ],
            [
                "Departure" => "Gerona Airport",
                "Arrival" => "Stockholm",
                "Transportation" => "Plane",
                "TransportationNumber" => "SK455",
                "Seat" => "3A",
                "Gate" => "45B",
                "Baggage" => "334"
            ],
            [
                "Departure" => "Stockholm",
                "Arrival" => "New York",
                "Transportation" => "Plane",
                "TransportationNumber" => "SK22",
                "Seat" => "7B",
                "Gate" => "22"
            ]
        ];
    

    Instead, provide a few completely different fixed tests, and design truly random tests: for instance, produce a random subset of a larger set of cities (or just use "A", "B", "C", ...), linking departures and arrivals in a random way: that would prevent submissions like above.

  • Custom User Avatar

    Random tests are not "shuffing the content of the same test case that we need to sort out anyway".

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution