From 57fab39995ff49644e0a041229505bb646bbc026 Mon Sep 17 00:00:00 2001 From: chechunchi Date: Mon, 23 Sep 2024 20:30:34 +0800 Subject: [PATCH] format --- leetcode-cc/SearchA2dMatrixII.hpp | 9 +++++---- runtime-cc/src/registration.cc | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/leetcode-cc/SearchA2dMatrixII.hpp b/leetcode-cc/SearchA2dMatrixII.hpp index 2be57a4..f7f711b 100644 --- a/leetcode-cc/SearchA2dMatrixII.hpp +++ b/leetcode-cc/SearchA2dMatrixII.hpp @@ -1,8 +1,9 @@ +#include +#include + #include "TestHelper.h" #include "problem.h" #include "solution.h" -#include -#include using namespace std; @@ -13,7 +14,7 @@ IMPLEMENT_PROBLEM_CLASS(PSearchA2dMatrixII, 240, DIFFI_MEDIUM, TOPIC_ALGORITHMS, {"Matrix"}); class SSearchA2dMatrixII : public ISolution { -public: + public: size_t problemId() const override { return 240; } string name() const override { return ("Solution for " + string("Search a 2D Matrix II")); @@ -33,7 +34,7 @@ class SSearchA2dMatrixII : public ISolution { }; int benchmark() const override { return 0; } -private: + private: bool searchMatrix(vector> &matrix, int target) const { int m = matrix.size(); int n = matrix[0].size(); diff --git a/runtime-cc/src/registration.cc b/runtime-cc/src/registration.cc index 66816df..5f49a74 100644 --- a/runtime-cc/src/registration.cc +++ b/runtime-cc/src/registration.cc @@ -117,6 +117,7 @@ #include "../leetcode-cc/RotateArray.hpp" #include "../leetcode-cc/SameTree.hpp" #include "../leetcode-cc/ScrambleString.hpp" +#include "../leetcode-cc/SearchA2dMatrixII.hpp" #include "../leetcode-cc/SearchInRotaedSortedArray.hpp" #include "../leetcode-cc/SetMismatch.hpp" #include "../leetcode-cc/ShortestPalindrome.hpp" @@ -149,7 +150,6 @@ #include "../leetcode-cc/WordSearchII.hpp" #include "../leetcode-cc/WordsDataStructure.hpp" #include "../leetcode-cc/ZeroOneMatrix.hpp" -#include "../leetcode-cc/SearchA2dMatrixII.hpp" const int registerAll(std::shared_ptr handle) { handle->registerProblem(