#include <stdio.h>
#define swap(x,y)(x=(x)+(y),y=(x)-(y),x=(x)-(y))
int b[100000000];
void quicksort(int a[],int s,int t){
int i,j;
if(s<t){
i=s;j=t+1;
while(1){
do i++;
while(!(a[s]<=a[i]||i==t));
do j--;
while(!(a[s]>=a[j]||j==s));
if(i<j) swap(a[i],a[j]);
else break;
}
swap(a[s],a[j]);
quicksort(a,s,j-1);
quicksort(a,j+1,t);
}
}
int main(){
int n;
scanf("%d",&n);
for(int i=1;i<=n;i++){
scanf("%d",&b[i]);
}
quicksort(b,1,n);
for(int i=1;i<=n;i++){
printf("%d%c",b[i],i==n?'\n':' ');
}
}
大佬们 我这根据书上写的 发现第一位都是不对的 想问一下哪里错了