From 595ab6ea07ab52e991865550a05003041088079f Mon Sep 17 00:00:00 2001 From: Martin Hsu <31008681+Martin-Hsu@users.noreply.github.com> Date: Fri, 17 Dec 2021 16:50:37 +0800 Subject: [PATCH] =?UTF-8?q?Update=200406.=E6=A0=B9=E6=8D=AE=E8=BA=AB?= =?UTF-8?q?=E9=AB=98=E9=87=8D=E5=BB=BA=E9=98=9F=E5=88=97.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use ref --- ...53\230\351\207\215\345\273\272\351\230\237\345\210\227.md" | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]; }