提交记录 27765
提交时间 |
评测时间 |
2025-01-20 00:14:17 |
2025-01-20 00:14:25 |
#include <cstddef> // for size_t
#include <algorithm> // for std::swap
void partition(unsigned *a, size_t start, size_t length, int bit) {
size_t left = start;
size_t right = start + length - 1;
while (left <= right) {
if (((a[left] >> bit) & 1) == 0) {
left++;
} else {
std::swap(a[left], a[right]);
right--;
}
}
}
void sort(unsigned *a, int n) {
for (int bit = 0; bit < 32; bit++) {
partition(a, 0, n, bit);
}
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 14.223 ms | 412 KB | Wrong Answer | Score: 0 | 显示更多 |
Testcase #2 | 3 s | 381 MB + 496 KB | Time Limit Exceeded | Score: 0 | 显示更多 |
Testcase #3 | 3 s | 762 MB + 980 KB | Time Limit Exceeded | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2025-04-05 23:45:28 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠