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:我都排不了 快排里面的函数怎么写?In Reply To:我都排不了 快排里面的函数怎么写? Posted by:ecjtunh at 2007-08-17 14:15:40 可以这样: struct SNOW { int a[6]; bool operator < (const SNOW &m)const { for(int i=0;i<5;i++) { if(a[i]!=m.a[i]) return a[i]<m.a[i]; } return a[5]<m.a[5]; } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator