| ||||||||||
| 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 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