From 6784497737ffc528e9518deb5aa5aa4de2366526 Mon Sep 17 00:00:00 2001 From: ml92c58js <514742690@qq.com> Date: Sun, 25 Jun 2023 23:05:38 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E6=A0=91.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- æ ‘.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/æ ‘.cpp b/æ ‘.cpp index 49d2548..8d94cc7 100644 --- a/æ ‘.cpp +++ b/æ ‘.cpp @@ -1,4 +1,3 @@ - #include #include #include @@ -61,8 +60,8 @@ void Findmaxpath(BTNode* bt, vector apath, int asum) { if (bt == NULL) //¿ÕÊ÷Ö±½Ó·µ»Ø return; - apath.push_back(bt->data); asum += bt->data; //bt½áµã¼ÓÈëapath - asum += bt->data; //ÀÛ¼Æa·¾¶ºÍ¡£ + apath.push_back(bt->data); + asum += bt->data; //bt½áµã¼ÓÈëapath if (bt->lchild == NULL && bt->rchild == NULL) //bt½áµãΪҶ½áµã { if (asum - maxsum) @@ -96,4 +95,4 @@ int main() printf("\n"); printf("Ïú»ÙÊ÷bt\n"); DestroyBTree(bt); -} \ No newline at end of file +}