提交记录 20643
提交时间 |
评测时间 |
2023-11-30 22:00:27 |
2023-11-30 22:00:34 |
#include <bits/stdc++.h>
using namespace std;
uint b[200000000];
void sort(uint* a, int __n) {
uint n = __n;
uint buc[4][256] = {};
for (uint i = 0; i < n; i++) {
buc[0][a[i] & 255]++;
buc[1][a[i] >> 8 & 255]++;
buc[2][a[i] >> 16 & 255]++;
buc[3][a[i] >> 24]++;
}
for (uint k = 0; k < 4; k++) {
uint32_t offset = 0;
for (uint i = 0; i < 256; i++)
swap(buc[k][i], offset), offset += buc[k][i];
}
for (uint i = 0; i < n; i++) b[buc[0][a[i] & 255]++] = a[i];
for (uint i = 0; i < n; i++) a[buc[1][b[i] >> 8 & 255]++] = b[i];
for (uint i = 0; i < n; i++) b[buc[2][a[i] >> 16 & 255]++] = a[i];
for (uint i = 0; i < n; i++) a[buc[3][b[i] >> 24 & 255]++] = b[i];
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 1.036 ms | 820 KB | Accepted | Score: 34 | 显示更多 |
Testcase #2 | 1.08 s | 762 MB + 1000 KB | Accepted | Score: 33 | 显示更多 |
Testcase #3 | 2.162 s | 1525 MB + 936 KB | Accepted | Score: 33 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2024-11-22 05:41:49 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠