提交记录 31010
| 提交时间 |
评测时间 |
| 2026-08-13 00:58:13 |
2026-08-13 00:58:21 |
#pragma GCC target("avx2,bmi")
#pragma GCC optimize("O3,unroll-loops")
typedef unsigned u32;
typedef unsigned long long u64;
enum { BITMAP_WORDS = 1U << 26 };
static u64 bitmap[BITMAP_WORDS] __attribute__((aligned(2097152)));
void sort(u32 *a, int n) {
int i = 0;
for (; i + 32 < n; ++i) {
u32 future = a[i + 32];
__builtin_prefetch(bitmap + (future >> 6), 1, 0);
u32 value = a[i];
bitmap[value >> 6] |= 1ULL << (value & 63U);
}
for (; i < n; ++i) {
u32 value = a[i];
bitmap[value >> 6] |= 1ULL << (value & 63U);
}
u32 output = 0;
for (u32 word_index = 0; word_index < BITMAP_WORDS; ++word_index) {
u64 word = bitmap[word_index];
while (word) {
a[output++] = (word_index << 6) | (u32)__builtin_ctzll(word);
word &= word - 1;
}
}
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 165.884 ms | 273 MB + 44 KB | Accepted | Score: 34 | 显示更多 |
| Testcase #2 | 2.614 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 11:00:27 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠