提交记录 3278
| 提交时间 |
评测时间 |
| 2018-07-11 11:44:10 |
2020-07-31 21:14:58 |
#include <string.h>
const int bucket = 256;
const int maxn = 100000005;
unsigned b[maxn], cnt[bucket];
void sort(unsigned *a, int n) {
for (int move = 0; move < 32; move += 8) {
memset(cnt, 0, sizeof cnt);
for (int j = 0; j < n; ++j) {
int x = (a[j] >> move) & 0xff;
++cnt[x];
}
for (int j = 1; j < bucket; ++j) cnt[j] += cnt[j - 1];
for (int j = n - 1; ~j; --j) {
int x = (a[j] >> move) & 0xff;
b[--cnt[x]] = a[j];
}
memcpy(a, b, sizeof b);
}
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 1.142 s | 762 MB + 972 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-04-18 21:16:21 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠