Ad
  • Custom User Avatar

    Very great kata, congrats to the authors :-) Check "Pentomino" ?

  • Custom User Avatar

    You are totally right.
    I changed the description.
    The intent of the unique radius point was to ensure that there are at least k different radii in the set. Otherwise it would not be possible to find a solution.
    I replaced that with: There is a valid solution.
    That should be less confusing

    And I changed the limit to fit to the tests: 0 < k <= N <= 1000

  • Custom User Avatar

    From the description:

    The input follows the ristrictions:
    
        k > 0 elements with a *unique* radius
        0 < k <= N < 1000
        m, r > 0
    

    but in the sample tests:

    largest_visible_area(2, {{2,16}, {2,14}, {3,27}});
    

    Clearly radii are not unique.

    Other than that tests with N == 1000 is being tested.

  • Custom User Avatar

    Done

  • Custom User Avatar

    Hi, I'm glad to hear that you liked it.
    I'm a bit short on time right now, but I will incorporate your suggestions on the weekend.
    Have fun solving katas!

  • Custom User Avatar

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

  • Custom User Avatar

    I solved the issue deleting global variables.

  • Custom User Avatar

    Hi, i'm think my solution is correct and i execute but get invalid answer. I printed testcases and it gives correct answer in my computer but in the Codewars execution gives other values, i have no idea why this is happening.

  • Custom User Avatar

    Same thing for python

  • Custom User Avatar

    fwiw, same problem in go - the simplest naive solution worked, to my surprise.

  • Custom User Avatar

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

  • Custom User Avatar

    Hint ::
    Make sure that the number you work with is positive ::
    You can Use the as a hepler header file !!
    Enjoy ...

  • Custom User Avatar

    I'm sorry. I realise now, that I should have been more clear and that this was the wrong place for a complaint like that.
    I realize now, that this should have been discussed in the beta phase of this translation and it probably was. I'm not yet familiar with the process of releasing katas ;)

    Anyways, here is why I thought that there is an issue.
    Writing down a given equation is in my opinion worth 7 or 8 kyu.
    My assumption( based on the tag and the comments) was, that the 4 kyu status was given because in other languages than c++ you have to find some optimated algorithm to pass all tests in the given time limit.
    Since c++ is rather new at CW, I came to the conclusion, that it was translated later on and got the same 4 kyu rating although it is really easy in c++.
    And I believed, that this translation is too easy, and therefore the translation itself is an issue.
    Therefore my solutions would be either downrank this translation ( is that even possible?) or prevent the translation to c++.
    But then again, if I understand it correctly, it is kind of too late to complain about that now ;)

  • Custom User Avatar

    I don't see why it is an issue... I put the tag "Optimization" because some comments said that brute force was not sufficient.
    The kyu is not given by the author but by a moderator.
    C++ waas one of the last translation hence I reduced the range in random tests. Moreover C++ seems to be very fast at CW. Last: maybe you are too good, you have almost exactly the same solution as mine:-)

  • Custom User Avatar

    From the tag "optimization" and the other comments I come to the conclusion, that a simple brute-force should not solve this kata.
    In c++ it does...
    I typed in your formula using two for loops and passed all tests. That was disappointing.

  • Loading more items...