diff --git "a/\344\270\244\346\225\260\344\271\213\345\222\214" "b/\344\270\244\346\225\260\344\271\213\345\222\214" new file mode 100644 index 0000000000000000000000000000000000000000..fb4d2bb2ac3c6dd4fc9aaa0f9b42651ac20042a9 --- /dev/null +++ "b/\344\270\244\346\225\260\344\271\213\345\222\214" @@ -0,0 +1,14 @@ +class Solution { +public: + vector twoSum(vector& nums, int target) { + int n = nums.size(); + for (int i = 0; i < n; ++i) { + for (int j = i + 1; j < n; ++j) { + if (nums[i] + nums[j] == target) { + return {i, j}; + } + } + } + return {}; + } +}; \ No newline at end of file