Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
as drgaur said "a lot of circle geometry, tangent lines, circle intersections" as well as path finding of course
BIO stands for "British Informatics Olympiad". Type that in instead.
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.
the solution is so elegant it's as if this kata was framed around the solution.
This comment is hidden because it contains spoiler information about the solution
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.
I'd be very grateful @monadius
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.
problems like this are good because it introduces users to mathematical optimisation, which comes up later in programming
This comment is hidden because it contains spoiler information about the solution
thanks @hydepark, i was also making it overly complicated but your comment made me realise the solution can be simple.
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.
this solution is kinda scuffed, my python solution is better
Loading more items...