提交记录 21558
提交时间 |
评测时间 |
2024-04-12 19:37:20 |
2024-04-12 19:37:26 |
#include<algorithm>
#include<cstring>
const int N = 1e8, T = 65536;
unsigned t[N], ct[T];
void sort(unsigned*a, int n) {
for (int i=0; i<n; i++) ct[a[i]&T-1]++;
for (int i=1; i<T; i++) ct[i] += ct[i-1];
for (int i=n-1; ~i; i--) t[--ct[a[i]&T-1]] = a[i];
memset(ct, 0, T*4);
for (int i=0; i<n; i++) ct[t[i]>>16&T-1]++;
for (int i=1; i<T; i++) ct[i] += ct[i-1];
for (int i=n-1; ~i; i--) a[--ct[t[i]>>16&T-1]] = t[i];
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 2.536 s | 763 MB + 204 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-11-24 00:16:16 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠