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 |
被阴了~~~~~~~~~排序时注意一下被阴了~~~~~~~~~排序时注意一下 我是用sort的~~~~~~~~~~ bool compare(Person &a, Person &b){ if(a.age == b.age) return strcmp(a.name,b.name) >= 0 ? true : false;//这里注意 return a.age < b.age; } 输出倒过来输出~~~~~~~~~~ Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator