zayakin andrey's submission of Counting The Important Pairs | CodeChef