Ad
  • Custom User Avatar

    Really humorous annotation:)

  • Custom User Avatar

    There are still two test cases behind: "lager_mn", "random_large_mn".

    So maybe you failed in some test cases of "large_mn", you can use std::cout in your code to check what params make this.

  • Custom User Avatar

    Glad you enjoyed it. If you're pretty certain of this error, you can post a bug/issue at: https://github.com/Codewars/codewars.com/issues
    Try to provide any information that may be relevant.

  • Custom User Avatar

    Hi, I seemed to successfully submit this kata twice in python version and got double score. Also in my completed kata history, there are two same katas named Plants and Zombies.It's this a bug of Codewars? Can anyone explain this, btw, I don't want to be treated as a cheater....Thx, Nice kata still.

  • Custom User Avatar

    oh, my poor English translation....

  • Custom User Avatar

    Fabulous kata ever!

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    For those who stucked in kernel laplacianFilter test case(C++ version). Here is the hint: if your calculated average sum (float) > 255 , let sum = 255, if pixel < 0, let sum = 0. Really stupid, waste me a lot of time.

  • Default User Avatar

    Very interesting kata! I almost undervalued this one, but it actually takes me some time to solve! Thx:)

  • Default User Avatar

    You can google SIGSEGV to find some useful hints.
    A SIGSEGV is an error(signal) caused by an invalid memory reference or a segmentation fault. You are probably trying to access an array element out of bounds or trying to use too much memory.
    Try to check your code with array.

  • Default User Avatar
  • Default User Avatar

    Thanks for the kind words. The Image constructors in C++ are:

    Image::Image()
    : pixels(NULL), width(0), height(0)
    {}
    
    Image::Image(initializer_list<unsigned> data, unsigned w, unsigned h)
    : width(w), height(h)
    { 
      pixels = new unsigned[w*h];
      unsigned *p=pixels;
      for(auto d : data)
        *p++ = d;
    }
    
  • Default User Avatar

    I know that. In my opinion, when lambda"sum" is used in accumulate, maybe it leads to a problem. Actually code want to assign 0 (the init number) to acc(the integer param in sum), but its function signature is(const char c, int acc), and maybe 0 -> c(the char param), and that's a little bug. You can take a look at the example in the link above. I tried these two verisons, and they all passed the test, so that's my problem.

  • Custom User Avatar

    Have you already realised what's wrong in your question? Those params are refer to lambda "sum" function. Not to accumulate.

  • Loading more items...