You are on page 1of 1

Question

Max. score: 100.00


Calculate result of variation of Sim game
In a twist to the classic pencil-and-paper game, Sim, a number of dots are drawn on
the paper, forming vertices of a convex polygon, for example, a Hexagon. Then, two
or more players take turns, joining 2 dots with a line using a coloured pencil in
each turn. Each player is given pencil of a different colour. The objective for
each player is to form as many convex polygons of a pre-decided number of sides as
they can with their colour. Your task, should you choose to accept it, is to
calculate the score of each player after a round of the Sim game, based on the
details of each turn provided as input.Note: A convex polygon is a polygon such
that any line segment between the two points of the polygon is contained entirely
within the boundary of the polygon.

Sample Explanation

You might also like