Greedy circle problem


only one test case is faling,plz help

if(v[i].first>=res) line 30