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:用sort排序的问题。。 Posted by:Acsaga at 2007-02-04 00:02:30 从形式上说你这个cmp必须等价于一个小于号而不是一个小于等于号或者别的什么东西 > 排序时写成 > bool cmp(G a, G b) { > if(a.time != b.time) > return a.time<b.time; > else > return a.stout<=b.stout; //注意这里 > } > 就RE > 写成 > bool cmp(G a, G b) { > if(a.time != b.time) > return a.time<b.time; > else > return a.stout<b.stout; //没有等号 > } > 就ac了,这是怎么回事? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator