From 058c3364ea1a3428b138c7d459ce5e70f1f4109a Mon Sep 17 00:00:00 2001 From: newde Date: Wed, 4 Feb 2026 18:24:16 -0500 Subject: [PATCH] =?UTF-8?q?=E5=88=AA=E9=99=A4=20260202/=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E6=8E=92=E5=BA=8F.cpp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 260202/快速排序.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 260202/快速排序.cpp diff --git a/260202/快速排序.cpp b/260202/快速排序.cpp deleted file mode 100644 index 63a984e..0000000 --- a/260202/快速排序.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include -using namespace std; - -int main(){ - int n; - int a[n]; - cin >> n; - for (int i=0;i> a[i]; -// ѡ򣺸 i λʵģСģ -for (int i = 0; i < n - 1; i++) { - int minidx = i; // 1. ȼµǰλ - for (int j = i + 1; j < n; j++) { - if (a[j] < a[minidx]) { // 2. ָС - minidx = j; // 3. ֻǼλã - } - } - swap(a[i], a[minidx]); // 4. ȫֻһ -} - for(int i=0;i