Skip to main content

Posts

Showing posts with the label codechef

Point Of Impact Codechef January 2021 solution || Point Of Impact codechef january 2021 editorial

 Point Of Impact Codechef January 2021 solution || Point Of Impact codechef january 2021 editorial - Problem statement- You are playing a Billiards-like game on an  N × N N × N  table, which has its four corners at the points  { ( 0 , 0 ) , ( 0 , N ) , ( N , 0 ) , { ( 0 , 0 ) , ( 0 , N ) , ( N , 0 ) ,  and  ( N , N ) } ( N , N ) } . You start from a coordinate  ( x , y ) ( x , y ) ,  ( 0 < x < N , 0 < y < N ) ( 0 < x < N , 0 < y < N )  and shoot the ball at an angle  45 ∘ 45 ∘  with the horizontal. On hitting the sides, the ball continues to move with the same velocity and ensuring that the angle of incidence is equal to the angle of reflection with the normal, i.e, it is reflected with zero frictional loss. On hitting either of the four corners, the ball stops there and doesn’t move any further. Find the coordinates of the point of collision, when the ball hits the sides for the  K t h K t h  time. If the ball stops before hitting the sides  K K  times, fin