提交记录 18734


用户 题目 状态 得分 用时 内存 语言 代码长度
xxxt 1001. 测测你的排序 Time Limit Exceeded 0 5 s 341808 KB C 641 B
提交时间 评测时间
2022-12-06 15:02:59 2022-12-06 15:03:08
//#include <stdio.h>
int temp[100000000];
void memsort(int l,int r,unsigned *a)
{
    if(l==r){
        return;
    }
    int mid=(l+r)/2;
    memsort(l,mid,a);
    memsort(mid+1,r,a);
    int i=l,j=mid+1,cnt=l;
    while(cnt<=r){
    if(i>mid){
            temp[cnt++]=a[j++];
        }else if(j>r){
                temp[cnt++]=a[i++];
        }else if(a[i]<a[j]){
                temp[cnt++]=a[i++];
            }else{
                temp[cnt++]=a[j++];
            }
    }
    for(int i=l;i<=r;i++){
        //printf("%d ",temp[i]);
        a[i]=temp[i];
    }
    //printf("\n");
}
void sort(unsigned *a, int n) {
	memsort(0,n-1,a);
}


CompilationN/AN/ACompile OKScore: N/A

Testcase #15 s333 MB + 816 KBTime Limit ExceededScore: 0


Judge Duck Online | 评测鸭在线
Server Time: 2025-09-16 20:53:46 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠