提交记录 1540
提交时间 |
评测时间 |
2018-06-20 21:22:18 |
2020-07-31 20:51:51 |
// #1322
void sort(unsigned *a, int n)
{
static unsigned b[100000005], c[0x20000];
unsigned *c1 = c, *c2 = c1 + 0x10000;
for (int i = 0; i != n; ++i)
++c1[a[i] & 0xFFFF], ++c2[a[i] >> 16];
for (int i = 1; i != 0x10000; ++i)
c1[i] += c1[i - 1];
for (int i = 1; i != 0x10000; ++i)
c2[i] += c2[i - 1];
for (int i = n - 1; i >= 0; --i)
b[--c1[a[i] & 0xFFFF]] = a[i];
for (int i = n - 1; i >= 0; --i)
a[--c2[b[i] >> 16]] = b[i];
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 2.579 s | 763 MB + 460 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-11-23 23:49:46 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠