sort(cost.begin(),cost.end(),[&](const vector<int>& a,const vector<int>& b){
        return a[2]<b[2];
    });