//lambda function for sorting vector ascending
sort(vec.begin(),vec.end(),[](int &a, int &b){
return a<b;
});
//lambda function for sorting vector of vector ascending based on first value
sort(vec.begin(),vec.end(),[](vector<int> &a, vector<int> &b){
return a[0]<b[0];
});