提交记录 19546
用户 | 题目 | 状态 | 得分 | 用时 | 内存 | 语言 | 代码长度 |
---|---|---|---|---|---|---|---|
Saisyc | 1001. 测测你的排序 | Compile Error | 0 | 0 ns | 0 KB | C++11 | 300 B |
提交时间 | 评测时间 |
---|---|
2023-07-03 16:21:35 | 2023-07-03 16:21:36 |
void sort(unsigned *a, int n) {
for (int sorted = 0, gap = n - 1; !sorted; gap /= 1.3) {
if (gap <= 1) {
gap = 1;
sorted = 1;
}
for (int i = 0, j = gap; j < n; i++, j++) {
if (a[i] > a[j]) {
unsigned tmp;
tmp = a[i];
a[i] = a[j];
a[j] = tmp;
sorted = 0;
}
}
}
Compilation | N/A | N/A | Compile Error | Score: N/A | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2025-09-15 05:32:55 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠