Https://online.codingblocks.com/app/player/129096/content/107253/5280/code-challenge

This is activity selection problem of stl
i am getting wrong answer i don’t know where i am doing mistake
i had used vector of pair