Ad
  • Custom User Avatar

    ball_test(2, xx___xx_x_xx_x_x_xxx____x______xxx_x_x_xxx____x_____x____x__xx____x_xxxx_xxx__x__x_xx___x___x__x__x_x_x___x______) should be true

    Really ?

    Edit: Refreshing the page and continuing to test the SAME code eventually resulted in some random tests that my code could pass.

  • Custom User Avatar

    Thanks! I was interpreting it that way, but I needed confirmation and your formulation is much clearer.

  • Custom User Avatar

    In C, I just brute-forced it. The main difficulty for me was importing the MD5 function on Windows. I tried linking MinGW against OpenSSL, but the MD5 function had already been deprecated. Eventually, I realized there are built-in packages in Windows:

    #include <windows.h>
    #include <wincrypt.h>
    #pragma comment(lib, "advapi32.lib")

    However, this doesn’t seem to work on Codewars. Not really surprised but what are the alternatives to access the MD5 function on the site ?

  • Custom User Avatar

    Somewhere, a compiler is weeping, but your solution works hopefully!

  • Custom User Avatar

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

  • Custom User Avatar

    I have two pieces of code on my machine (one iterative and one recursive), both of which work perfectly well in all cases. However, weirdly, the recursive one fails on the test provided here, even though the arrays for which it fails actually work just fine on my computer. No clue what the issue can be.