From b2d713b278ae01dcda375e1ae8687ad60c1b1163 Mon Sep 17 00:00:00 2001 From: pqz4hix59 <1551744337@qq.com> Date: Thu, 10 Feb 2022 13:29:11 +0800 Subject: [PATCH] ADD file via upload --- 堆排序.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 堆排序.cpp diff --git a/堆排序.cpp b/堆排序.cpp new file mode 100644 index 0000000..cec4ba1 --- /dev/null +++ b/堆排序.cpp @@ -0,0 +1,29 @@ +#include +int n,num[1000010]; +void down(int x) +{ + int y=x; + if(x*2<=n&&num[x*2]