Just instantiating vector and set each time when a new one is needed. No time difference according to UVa
Working Cut Ribbon problem on codeforces.com with 30ms run time