From 285c76412379e4289b4c1156fb8121c6d048116b Mon Sep 17 00:00:00 2001 From: Jdhggg <24016020834@stu.nsu.edu.cn> Date: Thu, 20 Mar 2025 20:48:08 +0800 Subject: [PATCH] =?UTF-8?q?sq=5Flist=E5=90=88=E5=B9=B6=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project2/Debug/Project2.log | 6 +--- .../Debug/Project2.tlog/CL.command.1.tlog | Bin 2958 -> 2958 bytes Project2/Debug/Project2.tlog/CL.read.1.tlog | Bin 12738 -> 13514 bytes Project2/Debug/Project2.tlog/CL.write.1.tlog | Bin 3944 -> 4354 bytes Project2/Debug/Project2.tlog/link.read.1.tlog | Bin 3974 -> 3750 bytes sq_list.c | 27 +++++++++--------- 6 files changed, 15 insertions(+), 18 deletions(-) diff --git a/Project2/Debug/Project2.log b/Project2/Debug/Project2.log index 9b540de..976bffc 100644 --- a/Project2/Debug/Project2.log +++ b/Project2/Debug/Project2.log @@ -1,6 +1,2 @@ - linked_list.c -C:\code\lencode\Project2\linked_list.c(31,24): warning C4028: 形参 1 与声明不同 -C:\code\lencode\Project2\linked_list.c(59,2): warning C4047: “return”:“address_node *”与“int”的间接级别不同 - sq_list.c - 正在生成代码... + sq_list.c Project2.vcxproj -> C:\code\lencode\Project2\Debug\Project2.exe diff --git a/Project2/Debug/Project2.tlog/CL.command.1.tlog b/Project2/Debug/Project2.tlog/CL.command.1.tlog index 966e035955cc522122a169b977d5d092c7e4dcd5..63d02921de1fab87535df6fd4037ea928c5a202a 100644 GIT binary patch delta 28 kcmeAZ?-QTkGkF~c$7Th#Q%sX@FllW}Sj4*d6~_`L0GHPaw*UYD delta 28 kcmeAZ?-QTkGx-{;$Yu}bMXZw#u!?Q;xx}>j6~_`L0Gj9u*Z=?k diff --git a/Project2/Debug/Project2.tlog/CL.read.1.tlog b/Project2/Debug/Project2.tlog/CL.read.1.tlog index 0a8cf83d3df88a39bdec541d9776d578ee03bafd..161a88492354ac7594a396cc8088bac5aa07e7a8 100644 GIT binary patch delta 421 zcmX?nOx%<8xKuVqd2mIBGk7xiF}N`JGlVk)GsG~sGxz}6P7IDf+LIv) zNQVGvf1sKepu9gr5SZ@=REOZZFt{?f0ab5Kg8_pn zgAq`@Gf+GfXqq0-J|7_DW#9seSpj9xT@lO>3A8N)Xs$1VF<5U1&@DkgelSe;`xOWsqeKFarQy C5)|VA diff --git a/Project2/Debug/Project2.tlog/CL.write.1.tlog b/Project2/Debug/Project2.tlog/CL.write.1.tlog index 578eaa402e6fc25b6651e781d16e5f3ed6ecbb89..cd2bbd56fdd2870579d2bf0afea9de24cd9eb5e9 100644 GIT binary patch delta 70 zcmaDM*QB&Tig~jgYZB8$AB)Lv_-ZygFe)%^zQ@bQIN6RhZSx2AH0F&Ho-j`4Vl|oU W#a%YpfpOd91SSzMAE+G2zW@Ma=@@YU delta 55 zcmZotdLg$#ig~jfj|$V|IF7W<4a|QSCmS#aY@Fc51f=;k%W(5CPHte%nykg)wYi4% J5l|UV4FK=15sd%< diff --git a/Project2/Debug/Project2.tlog/link.read.1.tlog b/Project2/Debug/Project2.tlog/link.read.1.tlog index d16d14dafeb366c6eec8f24575f593bb5468c56a..4b35156704737f08a14106ad9abae8af50207ba1 100644 GIT binary patch delta 7 OcmZpZUnaX@86N-(hXTz2 delta 76 zcmZ1`+a|wZ8Qdata == 0 || list_2->length == 0) + if (list_1->length == 0 || list_2->length == 0) { printf("һձ\n"); return; } - if ((list_1->length + list_1->length) > MAX) + if ((list_1->length + list_2->length) > MAX) printf("ܺͳΧ\nǻϲֻΪϲ\n"); - int flog = list_2->length; + int flog = 0; for (int i = 0; i < list_2->length; i++) { - for (int j = 0; j < list_1->length; j++) { + for (int j = 0; j < list_1->length; j++) + { if (list_1->data[j] != list_2->data[i]) continue; - else if (list_1->data[j] != list_2->data[i]) - break; + else if (list_1->data[j] == list_2->data[i]) + { + flog++; break; + } else { list_1->data[list_1->length] = list_2->data[i]; list_1->length++; - flog--; - break; } } } - printf("%dͬ %dͬ\n", flog, list_2->length - flog); + printf("%dͬ %dͬ\n", flog, list_2->length - flog); } -/*ist_1->data[list_1->length] = list_2->data[i]; -list_1->length++; -flog--; -break;*/ \ No newline at end of file +//if (list_1->data[j] != list_2->data[i]) +//continue; +//else if (list_1->data[j] == list_2->data[i]) +//break; \ No newline at end of file