From 3ce98f5a5eaddb5551e24b6c3124b912a3c28255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:05:27 +0000 Subject: [PATCH 01/17] test --- ...0\347\273\204\347\232\204\345\222\214.cpp" | 24 ------------------- ...4\346\225\260\344\271\213\345\222\214.cpp" | 14 ----------- 2 files changed, 38 deletions(-) delete mode 100644 "2209040041/chapter_1/lc_1\346\211\200\346\234\211\345\245\207\346\225\260\351\225\277\345\272\246\345\255\220\346\225\260\347\273\204\347\232\204\345\222\214.cpp" delete mode 100644 "2209040079/chapter 1/lc \344\270\244\346\225\260\344\271\213\345\222\214.cpp" diff --git "a/2209040041/chapter_1/lc_1\346\211\200\346\234\211\345\245\207\346\225\260\351\225\277\345\272\246\345\255\220\346\225\260\347\273\204\347\232\204\345\222\214.cpp" "b/2209040041/chapter_1/lc_1\346\211\200\346\234\211\345\245\207\346\225\260\351\225\277\345\272\246\345\255\220\346\225\260\347\273\204\347\232\204\345\222\214.cpp" deleted file mode 100644 index aff7219a..00000000 --- "a/2209040041/chapter_1/lc_1\346\211\200\346\234\211\345\245\207\346\225\260\351\225\277\345\272\246\345\255\220\346\225\260\347\273\204\347\232\204\345\222\214.cpp" +++ /dev/null @@ -1,24 +0,0 @@ -int arrSum(int* arr, int start, int end){ - int i, res = 0; - for(i = start; i < start + end; i++) - { - res += arr[i]; - } - - return res; -} -int sumOddLengthSubarrays(int* arr, int arrSize){ - int i = 0; - int j = 0; - int k = 0; - int ans = 0; - - for(i = 1; i <= arrSize; i += 2){ - for(j = 0; j < i; j += i){ - for(k = j; k < arrSize - i + 1;k++){ - ans += arrSum(arr, k ,i); - } - } - } - return ans; -} \ No newline at end of file diff --git "a/2209040079/chapter 1/lc \344\270\244\346\225\260\344\271\213\345\222\214.cpp" "b/2209040079/chapter 1/lc \344\270\244\346\225\260\344\271\213\345\222\214.cpp" deleted file mode 100644 index 18918d6b..00000000 --- "a/2209040079/chapter 1/lc \344\270\244\346\225\260\344\271\213\345\222\214.cpp" +++ /dev/null @@ -1,14 +0,0 @@ -class Solution { -public: - vector twoSum(vector& nums, int target) { - unordered_map hash; - for (int i = 0; i < nums.size(); ++i) - { - if (hash.find(target - nums[i]) != hash.end()) - return { hash[target - nums[i]],i }; - else - hash[nums[i]] = i; - } - return {}; -} -}; \ No newline at end of file -- Gitee From c6d4b359550b5ce72b5f6b64b6eaf761d0746d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:05:35 +0000 Subject: [PATCH 02/17] test -- Gitee From 6cd5f16685cdec0c4e6717b700fac94d8e272346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:16:21 +0000 Subject: [PATCH 03/17] test. --- ...4\346\225\260\344\271\213\345\222\214.cpp" | 19 +++++++++++++++ ...0\347\273\204\347\232\204\345\222\214.cpp" | 24 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 "2209040004/chapter1/\344\270\244\346\225\260\344\271\213\345\222\214.cpp" create mode 100644 "2209040014/chapter1/lc_1\346\211\200\346\234\211\345\245\207\346\225\260\351\225\277\345\272\246\345\255\220\346\225\260\347\273\204\347\232\204\345\222\214.cpp" diff --git "a/2209040004/chapter1/\344\270\244\346\225\260\344\271\213\345\222\214.cpp" "b/2209040004/chapter1/\344\270\244\346\225\260\344\271\213\345\222\214.cpp" new file mode 100644 index 00000000..8586fde2 --- /dev/null +++ "b/2209040004/chapter1/\344\270\244\346\225\260\344\271\213\345\222\214.cpp" @@ -0,0 +1,19 @@ +int* twoSum(int* nums, int numsSize, int target, int* returnSize) +{ +int i=0,j=0; +int *a=(int*)malloc(sizeof(int)*2); +for(i=0;i Date: Fri, 15 Sep 2023 09:16:31 +0000 Subject: [PATCH 04/17] test. -- Gitee From 5b20c39cf09bd2a3c929d76539b179354b4d99d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:16:32 +0000 Subject: [PATCH 05/17] test. -- Gitee From 72ae250036b97e979f61442b5518ab8fa4840e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:16:35 +0000 Subject: [PATCH 06/17] test. -- Gitee From be13a2f646b0dec0c05ccd58c6145ec1d425d1d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:16:36 +0000 Subject: [PATCH 07/17] test. -- Gitee From ff4c1fba474260445da3f4af3af43ac6b06089fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:16:37 +0000 Subject: [PATCH 08/17] test. -- Gitee From 7894771264977cbffd5f89a5f4f5dc9fc12e667d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:16:41 +0000 Subject: [PATCH 09/17] test. -- Gitee From 692ee82acec6fd7ca71cf42762c0cb7218420366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:16:42 +0000 Subject: [PATCH 10/17] test. -- Gitee From f69aa63b4d62572db685e73221f03373a02b3227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:16:45 +0000 Subject: [PATCH 11/17] test. -- Gitee From b79e6dba67ef42be5853e1907361064395b69afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:16:46 +0000 Subject: [PATCH 12/17] test. -- Gitee From 7aec8bdfae57d6c44bdbddde0304f09bbfd2fd3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:16:47 +0000 Subject: [PATCH 13/17] test. -- Gitee From b8d5c3a282d37ec025ee0cf0d6663088a65f3bd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:16:50 +0000 Subject: [PATCH 14/17] test. -- Gitee From efdb463f0b5e5f27c5a7a6f22ac5c1c4b48647ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:16:51 +0000 Subject: [PATCH 15/17] test. -- Gitee From 95dfbc97a3bdda837e3cbfcc25c63a907c10499c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:39:05 +0000 Subject: [PATCH 16/17] test. --- .../chap1/\344\270\244\346\225\260\344\271\213\345\222\214.cpp" | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 "2209040047/chap1/\344\270\244\346\225\260\344\271\213\345\222\214.cpp" diff --git "a/2209040047/chap1/\344\270\244\346\225\260\344\271\213\345\222\214.cpp" "b/2209040047/chap1/\344\270\244\346\225\260\344\271\213\345\222\214.cpp" new file mode 100644 index 00000000..e69de29b -- Gitee From 4c55673ff1cdde5da4dea2facb52279244440ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8B=E6=B0=B4=E9=81=93=E8=9A=82=E8=9A=81?= <2212064715@qq.com> Date: Fri, 15 Sep 2023 09:42:49 +0000 Subject: [PATCH 17/17] 111 --- .../\344\270\244\346\225\260\344\271\213\345\222\214.cpp" | 6 ++++++ 1 file changed, 6 insertions(+) diff --git "a/2209040047/chap1/\344\270\244\346\225\260\344\271\213\345\222\214.cpp" "b/2209040047/chap1/\344\270\244\346\225\260\344\271\213\345\222\214.cpp" index e69de29b..b2970706 100644 --- "a/2209040047/chap1/\344\270\244\346\225\260\344\271\213\345\222\214.cpp" +++ "b/2209040047/chap1/\344\270\244\346\225\260\344\271\213\345\222\214.cpp" @@ -0,0 +1,6 @@ +#include +int main() +{ + printf("HELLO WORLD"); + return 0; +} \ No newline at end of file -- Gitee