c++ sort
老是搞混
return bool
eg.
1 bool cmp(node a,node b) 2 { 3 if (a.score==b.score) 4 return strcmp(a.name,b.name)<0; 5 else 6 return a.score>b.score; 7 }
老是搞混
return bool
eg.
1 bool cmp(node a,node b) 2 { 3 if (a.score==b.score) 4 return strcmp(a.name,b.name)<0; 5 else 6 return a.score>b.score; 7 }