you can use the STL function sort(v.begin(),v.end(),comp) with your own
compare function.
bool comp(pair a,pair b){
return a.first(or second)<b.first;
}
在 2012-7-17 下午10:14,"mitesh" <[email protected]>写道:
> How to sort pair of int element considering one element..
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-code/-/Zfqy75i2vj0J.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.