提交记录 15080
提交时间 |
评测时间 |
2020-11-21 08:28:59 |
2020-11-21 08:29:03 |
#define re register
#define Rep(i, a, b) for(re int i = (a); i < (b); ++ i)
#define Down(i, a) for(re int i = (a) - 1; ~i; -- i)
void sort(unsigned *a, int n) {
int cnt[4][0x100], b[100000000];
Rep(i, 0, n)
++ cnt[0][(a[i] ) & 0xff],
++ cnt[1][(a[i] >> 8) & 0xff],
++ cnt[2][(a[i] >> 16) & 0xff],
++ cnt[3][(a[i] >> 24) & 0xff];
Rep(i, 1, 0x100)
cnt[0][i] += cnt[0][i - 1],
cnt[1][i] += cnt[1][i - 1],
cnt[2][i] += cnt[2][i - 1],
cnt[3][i] += cnt[3][i - 1];
Down(i, n)
b[-- cnt[0][(a[i] ) & 0xff]] = a[i];
Down(i, n)
a[-- cnt[1][(b[i] >> 8) & 0xff]] = b[i];
Down(i, n)
b[-- cnt[2][(a[i] >> 16) & 0xff]] = a[i];
Down(i, n)
a[-- cnt[3][(b[i] >> 24) & 0xff]] = b[i];
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 808.617 ms | 762 MB + 976 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2025-07-16 04:21:51 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠