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]