提交记录 20894
提交时间 |
评测时间 |
2024-01-27 20:49:41 |
2024-01-27 20:49:43 |
# include <stdio.h>
void assign(bool * pointer, bool value) {
if (pointer != NULL) {
*pointer = value;
}
}
void sort(unsigned * a, int n) {
int i, j, t;
bool swapped = true;
for (i = n - 1; i > 0 && swapped; i--) {
swapped = false;
for (j = 0; j < i; j++) {
if (a[j] > a[j + 1]) {
t = a[j];
a[j] = a[j + 1];
a[j + 1] = t;
assign(&swapped, true);
assign(&swapped, true);
assign(&swapped, true);
assign(&swapped, true);
assign(&swapped, true);
}
}
}
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 104.603 ms | 48 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2025-07-22 16:07:56 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠