• Another question in the same vein as some below: running this in C#, getting correct answers, but the full test suite times out.
    For n=20000, m=30000 (above the test limit), this still only takes 808ms. How much faster does it need to be?
    Edit: down to 640ms, still no luck.

  • Here's another one:

    [ [ 2, 6 ], [], [ 0 ], [ 1, 2 ], [ 2, 2, 6, 3 ], [], [] ]
    Capacity:  5
    

    My log: [ 0, 2, 4, 6, 4, 3, 2, 1, 0 ]

    expected [ 0, 2, 4, 6, 4, 3, 2, 1, 0 ] to have the same members as [ 0, 4, 3, 2, 1, 0 ]
    

    Similar case, where the first floor takes on people.

  • Thanks for that, I don't remember that being there!

    As I thought, my solution did give that expected result above. My solution only fails one random test occasionally, and sometimes completely passes. Just rerunning the tests now 'til I get another failed test short enough to see the expected.

  • you can find it in the trainer ("past solutions" panel) or in the "Solutions/my solutions" page.

  • Well my solution seems to have deleted itself, so I can't check anymore! But that solution you got seems to match what I got as a result, but the test failed.

  • I am not sure if you have confused yourself. (OTOH, I am sure you have confused me).

    When I add and execute a Typescript test using the input you gave if gives expected result [ 0, 2, 3, 4, 5, 4, 3, 2, 1, 0 ] which at first glance looks ok.

  • Potential issue with Typescript tests.

    I have this test case:

    [ [ 3 ], [], [ 1, 4 ], [ 1, 4, 0, 0 ], [], [ 4 ] ]
    Capacity:  5
    

    which has this solution

    [ 0, 5, 4, 3, 2, 1, 0 ]
    

    According to the question, people can get on the ground floor at the start of the problem. So why does this lift not stop at Floor 3 before proceeding to Floor 5? And in that case, it would also stop at 2 and 4 on the way up.

  • Done :)

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

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

  • manual notification, see above

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

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

  • Loading more items...