• Custom User Avatar

    Can i get some help please.
    I fail on the random tests and fail to understand why.
    Test cases indicate that this should be false. But my code outputs true.

    array (
      9 => 82,
      2 => 76,
      10 => 75,
      1 => 71,
      16 => 68,
      4 => 64,
      7 => 62,
      15 => 52,
      11 => 46,
      6 => 44,
      5 => 38,
      13 => 25,
      0 => 23,
      8 => 23,
      12 => 21,
      14 => 16,
      3 => 8,
    )
    array (
      9 => 6724,
      2 => 5776,
      10 => 5625,
      1 => 5042,
      16 => 4624,
      4 => 4096,
      7 => 3844,
      15 => 2704,
      11 => 2116,
      6 => 1936,
      5 => 1444,
      13 => 625,
      0 => 529,
      8 => 529,
      12 => 441,
      14 => 256,
      3 => 64,
    )
    

    Failed asserting that true matches expected false.

  • Custom User Avatar

    Hey all,

    I'll have to agree with Chrono.
    Someone else may have the same problem as i did so this is something best fixed in the original solution.

    Thank you guys very much for the support. With copying the input i pass all tests without any issue.

    P.S.
    Also deleting the content of my comment with the solution so someone does not stumble on it.

  • Custom User Avatar

    -- This comment originally contained a solution to this task, now removed so no one stumbles on it by accident.

  • Custom User Avatar

    Hey @TheDrw,

    I pass all test cases like so:

    Time: 11ms Passed: 2 Failed: 1
    Test Results:
    Tests
    Example_Tests
    Test Passed
    Edge_Cases
    Test Passed
    Random_Tests
    Expected: equal to ttteyefph
    Actual: rutkkpcstndbatbe

    What wierd i can see is that from time to time i get these really really long strings in the expcted. Like:

    scapabskcecebiztbaapsnrrpghd - 269
    bksebpeeoppohzteao - 202
    cte - 28
    sstatlaraiouteimo - 218
    uoasfr - 80
    etiaensra - 92
    ks - 30
    tt - 40
    nrei - 46
    phpor - 73
    dyk - 40
    ekaiuuonhaaka - 119
    er - 23
    yi - 34
    at - 21
    Expected: equal to scapabskcecebiztbaapsnrrpghdbksebpeeoppohzteaoctesstatlaraiouteimouoasfretiaensra
    Actual: scapabskcecebiztbaapsnrrpghd

    In a second reply i will give my solution and mark it as a spoiler. If other people have solved this than the problem must be with me.

  • Custom User Avatar

    @TheDrw. Ping!

  • Custom User Avatar

    Hello all. I believe the C++ solution may be broken.
    My solution always fails on the random-generated tests.
    However:

    I receive this random input:
    inrpahbtnftueiearpnkeras k oru nt ao atie ckaim ecrcssoheeaszieida oosba espeuipy dkbyttkteeozurar oasaattpsoc babaea stp gplr pkhh

    My scoring is this:

    inrpahbtnftueiearpnkeras - 271

    k - 11

    oru - 54

    nt - 34

    ao - 16

    atie - 35

    ckaim - 37

    ecrcssoheeaszieida - 174

    oosba - 52

    espeuipy - 116

    dkbyttkteeozurar - 222

    oasaattpsoc - 130

    babaea - 12

    stp - 55

    gplr - 53

    pkhh - 43

    The test result however tells me this:

    Expected: equal to pkhh
    Actual: inrpahbtnftueiearpnkeras

    Am i doing something wrong or the test cases are broken.