Problem A :
The ball is invisible for time: [S, T], which means it will be invisible for the section: [S*V, T*V]. To hit the ball by Akoi D
must not lie in this section, that means D
should be less than S * V
or greater than T * V
Problem B:
Just a straight forward implementation, print those numbers which are not equal to X.
Problem C:
Key Point: There are no white cells in the polygon of black cells, so, you can assume the polygon as a contiguous block of black cells, whose edges we have to find.
To find edges: