parent
d89b396aee
commit
595ab6ea07
|
|
@ -101,7 +101,7 @@ C++代码如下:
|
|||
// 版本一
|
||||
class Solution {
|
||||
public:
|
||||
static bool cmp(const vector<int> a, const vector<int> b) {
|
||||
static bool cmp(const vector<int>& a, const vector<int>& b) {
|
||||
if (a[0] == b[0]) return a[1] < b[1];
|
||||
return a[0] > b[0];
|
||||
}
|
||||
|
|
@ -130,7 +130,7 @@ public:
|
|||
class Solution {
|
||||
public:
|
||||
// 身高从大到小排(身高相同k小的站前面)
|
||||
static bool cmp(const vector<int> a, const vector<int> b) {
|
||||
static bool cmp(const vector<int>& a, const vector<int>& b) {
|
||||
if (a[0] == b[0]) return a[1] < b[1];
|
||||
return a[0] > b[0];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue