Point Of Impact Codechef January 2021 solution || Point Of Impact codechef january 2021 editorial -
2 5 5 4 4 5 2 3 1
5 5 3 5
Actually this is a simple problem you need little bit of maths knowledge to solve this problem.
You have to find 4 points on where the ball is striking. the fact is that the ball can strike a maximum of 4 different point and after first 4 point point of impact will start repeating.
You need to find 4 points of impact and ball direction(clockwise / anticlockwise) .ans differ according to ball direction.
Here is my code. look it and check how i implemented this logic.
Join telegram channel for code and editorial.-https://t.me/competitiveProgrammingDiscussion