提交记录 31015
| 提交时间 |
评测时间 |
| 2026-08-13 00:58:16 |
2026-08-13 00:58:41 |
#pragma GCC target("avx2")
#pragma GCC optimize("O3", "unroll-loops")
#define BITMAP_WORDS (1U << 27)
static unsigned bitmap[BITMAP_WORDS] __attribute__((aligned(2097152)));
void sort(unsigned *a, int n) {
for (int i = 0; i < n; ++i) {
#ifdef BITMAP_PREFETCH
if (i + BITMAP_PREFETCH < n)
__builtin_prefetch(bitmap + (a[i + BITMAP_PREFETCH] >> 5), 1, 0);
#endif
unsigned value = a[i];
bitmap[value >> 5] |= 1U << (value & 31);
}
unsigned output = 0;
for (unsigned word_index = 0; word_index < BITMAP_WORDS; ++word_index) {
unsigned bits = bitmap[word_index];
while (bits) {
a[output++] = (word_index << 5) + (unsigned)__builtin_ctz(bits);
bits &= bits - 1;
}
}
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 147.358 ms | 273 MB + 44 KB | Accepted | Score: 34 | 显示更多 |
| Testcase #2 | 2.699 s | 893 MB + 508 KB | Accepted | Score: 33 | 显示更多 |
| Testcase #3 | 3 s | 1274 MB + 988 KB | Time Limit Exceeded | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-09-12 10:53:53 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠