Alice and Bob like to eat lunch at Polypizza, a hip new pizzeria that lets you choose the shape of your pizza. Whenever they come to Polypizza, Alice and Bob order a single pizza in the shape of a polygon that they like on that day. Since they want to share the pizza equally, they want the pizza to be symmetrical. They have asked for your help in determining how many reflective symmetries their pizza has (as they are too busy choosing the shapes of their toppings).
Alice and Bob's pizza has
Input Specification
The input will contain 10 datasets. Each dataset begins with a single integer
For the first 3 datasets,
For the first 7 datasets,
Output Specification
For each dataset, output the number of reflectional symmetries that the pizza has.
Sample Input (Two Datasets Shown)
4
0 0
1 1
1 2
2 0
4
0 0
0 1
1 1
1 0
Sample Output
0
2
Educational Computing Organization of Ontario - statements, test data and other materials can be found at ecoocs.org
Comments