提交记录 1847


用户 题目 状态 得分 用时 内存 语言 代码长度
Simpson561 1001. 测测你的排序 Compile Error 0 0 ns 0 KB C 616 B
提交时间 评测时间
2018-06-21 09:52:05 2020-07-31 20:55:31
void swap(unsigned *a, unsigned *b)
{
	unsigned t = *a; *a = *b; *b = t;
}

void sort(unsigned *a, int n, int low,int high)
{
    if(low >= high)
    {
        return;
    }
    int first = low;
    int last = high;
    int key = a[first];
    while(first < last)
    {
        while(first < last && a[last] >= key)
        {
            --last;
        }
 
        a[first] = a[last];/*将比第一个小的移到低端*/
 
        while(first < last && a[first] <= key)
        {
            ++first;
        }
         
        a[last] = a[first];    
    }
    a[first] = key;
    sort(a, low, first-1);
    sort(a, first+1, high);
}

CompilationN/AN/ACompile ErrorScore: N/A


Judge Duck Online | 评测鸭在线
Server Time: 2026-04-23 17:00:23 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠