Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:假如两个原来sort一样的时候按照原来的顺序排输出 ??你的没有In Reply To:看看有什么不同的地方,我的过了, Posted by:lj__1030 at 2010-07-14 11:45:29 typedef struct code{ int num; int H; bool operator < (const code & a)const{ if(a.num<num)return 0; else if(a.num>num) return 1; else if(a.H<H)return 0; else return 1; } }; 这是我的结构体 在里面重载 < 号 然后 sort() 就行了 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator