struct cmpa{
bool operator ()(const int &i,const int &j){
return a[i]<a[j];
}
};
用priority_queue<int,vector
That is if you want to be written in descending order <No.
struct cmpa{
bool operator ()(const int &i,const int &j){
return a[i]<a[j];
}
};
用priority_queue<int,vector
That is if you want to be written in descending order <No.