提交记录 27916
提交时间 |
评测时间 |
2025-02-12 11:55:46 |
2025-02-12 11:55:56 |
#pragma GCC optimize(3, "Ofast", "unroll-loops", "-funroll-loops")
#include<bits/stdc++.h>
using namespace std;
using i32 = int;
using i64 = long long;
using i128 = __int128;
using u32 = unsigned int;
using u64 = unsigned long long;
using u128 = unsigned __int128;
void sort(unsigned *a, int n) {
array<int, 65540> cnt {};
vector<unsigned> aa(n);
for (int i = 0; i < n; i++) {
cnt[a[i] & 65535]++;
}
for (int i = 1; i < 65536; i++) {
cnt[i] += cnt[i - 1];
}
for (int i = n - 1; ~i; i--) {
aa[--cnt[a[i] & 65535]] = a[i];
}
cnt.fill(0);
for (int i = 0; i < n; i++) {
cnt[aa[i] >> 16]++;
}
for (int i = 1; i < 65536; i++) {
cnt[i] += cnt[i - 1];
}
for (int i = n - 1; ~i; i--) {
a[--cnt[aa[i] >> 16]] = aa[i];
}
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 4.699 s | 1024 MB + 288 KB | Accepted | Score: 100 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2025-02-23 01:23:52 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠