Beautiful vertices prob

please help me to find the mistake in the code

The link to the code is :- https://ide.codingblocks.com/s/230129