diff --git "a/problems/0406.\346\240\271\346\215\256\350\272\253\351\253\230\351\207\215\345\273\272\351\230\237\345\210\227.md" "b/problems/0406.\346\240\271\346\215\256\350\272\253\351\253\230\351\207\215\345\273\272\351\230\237\345\210\227.md" index 40756878d3..c31e8440c4 100644 --- "a/problems/0406.\346\240\271\346\215\256\350\272\253\351\253\230\351\207\215\345\273\272\351\230\237\345\210\227.md" +++ "b/problems/0406.\346\240\271\346\215\256\350\272\253\351\253\230\351\207\215\345\273\272\351\230\237\345\210\227.md" @@ -101,7 +101,7 @@ C++代码如下: // 版本一 class Solution { public: - static bool cmp(const vector a, const vector b) { + static bool cmp(const vector& a, const vector& 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 a, const vector b) { + static bool cmp(const vector& a, const vector& b) { if (a[0] == b[0]) return a[1] < b[1]; return a[0] > b[0]; }