Apples on vertices

Problem Name:
Apples on vertices
Site:HackerEarth
Links:
Tags: