template<typename T>

bool operator<(const int &a,const vector<T> &b) { return a < b.size(); }


이걸 선언해두고


vector<int> tmp;

for(int i=0;i<tmp;i++) ...


하면 잘 됩니다.


무심코 타이핑하다가 한번 해봤다능...