Ad
  • Custom User Avatar

    as drgaur said "a lot of circle geometry, tangent lines, circle intersections" as well as path finding of course

  • Custom User Avatar

    BIO stands for "British Informatics Olympiad". Type that in instead.

  • Custom User Avatar

    I tried that at first but no it's not fast enough. The solution is mathematical but the logic behind it is derived from pattern spotting. I recommend looking at the mark scheme for this question in BIO 2017, that helped me solve this.

  • Custom User Avatar

    the solution is so elegant it's as if this kata was framed around the solution.

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    i tried that approach and found that it's not possible to generate 10^10 primes in the time given. you should use a wikipedia page that discusses what the kata is about.

  • Custom User Avatar

    I'd be very grateful @monadius

  • Custom User Avatar

    Here's some help. Imagine these instructions were given to a robot, how would a robot interpret these instructions to move to a required position? As MrCookies78 has said, the position of the robot isn't reset between function calls. If you're using python you can type "Ctrl + Enter" instead of "Enter" to run all the tests, giving you more tests to look at to test your theories.

  • Custom User Avatar

    problems like this are good because it introduces users to mathematical optimisation, which comes up later in programming

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    thanks @hydepark, i was also making it overly complicated but your comment made me realise the solution can be simple.

  • Custom User Avatar

    i haven't solved the kata yet but the description should give more complex examples. for example given the list [1, 2, 3, 4] you don't have choose a certain permutation and work left to right (e.g. doing 1+2=3, 3+3=6, 6+4=10), you could instead add 1 and 2, then add 3 and 4 separately, then combine the two sums into one. this description doesn't cover this case and i don't know if this is done intentionally to make it harder to solve or what, i just think it's deceiving to provide only examples that make you think a certain way and essentially throw you off. i've seen this done on other katas but my rant ends here...

    PS - i know the description suggests you can add numbers in this dynamic way but more examples would make this clearer. also this was a nice kata.

  • Custom User Avatar

    this solution is kinda scuffed, my python solution is better

  • Loading more items...