devcpp在运行c语言快速排序算法时,当读入到第400多个数据之后就无法读入了,为什么?

如题,当读到第四百多个数的时候就无法继续读入了。但是提交到oj上出来的是WA,意思应该是可以运行但结果不对吧。

#include<stdio.h>
int num[100000];
int sort(int low, int high); 
void quick(int start,int end);
int main()
{
    int tot;
    int i;

    scanf("%d",&tot);
    for(i=0;i<tot;i++){
        scanf("%d",&num[i]);
    }
    quick(0,tot-1);
    printf("%d",num[0]);
    for(i=1;i<tot;i++){
        printf(" %d",num[i]);
    }
    printf("\n");
    return 0;

}
int sort(int low, int high){
    int temp=num[low];
    while(low<high){
        while(low<high&&num[high]>=temp) high--;
        if(low>=high) break;
        else num[low]=num[high];
        while(low<high&&num[low]<=temp) low++;
        if(low>=high) break;
        else num[high]=num[low];
        num[low]=temp;
    }
    return low;
}
void quick(int start,int end){
    int sor=sort(start,end);
    if(sor>start+1) quick(start,sor-1);
    if(sor<end-1) quick(sor+1,end);
}

如图
图片说明

wa = wrong answer,错误的回答
scanf("%d",&num[i]);
这个可以换行输入
估计 int sort(int low, int high) 这个函数没有写对,你自己检查下