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