提交记录 21290


用户 题目 状态 得分 用时 内存 语言 代码长度
Saisyc 1001a. 测测你的排序2 Accepted 100 110.141 ms 48 KB C++ 514 B
提交时间 评测时间
2024-02-20 15:48:42 2024-02-20 15:48:43
#include <algorithm>
void exchange(unsigned & x, unsigned & y) {
	unsigned t = x;
	x = y;
	y = t;
}
void sort(unsigned * a, int n) {
	int m = n / 2;
    for (int i = n - 1; i > m; i--) {
        for (int j = 0; j < i; j++) {
            if (a[j] > a[j + 1]) {
                std::swap(a[j], a[j + 1]);
            }
        }
    }
    for (int i = m; i > 0; i--) {
        for (int j = 0; j < i; j++) {
            if (a[j] > a[j + 1]) {
                std::swap(a[j], a[j + 1]);
            }
        }
    }
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1110.141 ms48 KBAcceptedScore: 100


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