STANDER_CODE
Tuesday, 23 June 2015
STRUCTURE SORT
FIRST INCREASING SECOND DECREASING
bool cmp(pair<int,int> x,pair<int,int> y)
{
if(x.first==y.first)
{
return x.second>y.second;
}
else
return x.first<y.first;
}
sort(p,p+n,cmp);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment