Editorial for RGPC '17 P1 - Circle Clicking!
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
This problem simply asks you to repeatedly calculate the distance between two consecutive points using the Pythagorean theorem or the distance formula . If the distance is less than or equal to , increment a counter for the current combo; otherwise, update a counter for maximum combo if the current combo is greater, and then reset the current combo to 0. Make sure to update the coordinates of and to and so you're not just calculating distances from point 1 to all other points.
Time complexity:
Comments