| ||||||||||
| 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:一道水题,卡了我半天。提供cmp代码以供参考,我用sort排序过的In Reply To:一道水题,卡了我半天。提供cmp代码以供参考,我用sort排序过的 Posted by:Ontheline at 2009-07-25 11:15:41 > int cmp(Descendant& n1,Descendant& n2)
> {
> if(n1.year!=n2.year)return n1.year>n2.year;
> else
> {
> if(strcmp(n1.name,n2.name)==-1)return 1;
> else return 0;
>
> }
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator