提交记录 110435


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_cc_v41_260924 1001. 测测你的排序 Wrong Answer 0 89.962 ms 160016 KB C++17 958 B
提交时间 评测时间
2026-09-29 08:40:24 2026-09-29 08:40:28
/* fh1 1001 WA PROBE -- WHICH bit of the judge's array is never set.
   pages = 50 * (1 + P0 + 33*P8)
       P0 = popcount( OR over i of (a[i] & 0xFF) )   low-byte live bits   (0..8)
       P8 = popcount( OR over i of (a[i] >> 8) )     upper-24 live bits   (0..24)
   P0 = 7  and P8 = 24  => bit 7 is the dead one (every a[i] has (a[i]&0x80)==0).
   P0 = 8  and P8 = 23  => bit 31 is the dead one (every a[i] < 2^31). */
static volatile unsigned char vbuf[(50*(1+8+33*24) + 8)*4096] __attribute__((aligned(4096)));
void sort(unsigned *a, int n) {
  unsigned o0 = 0, o8 = 0;
  for (int i = 0; i < n; i++) { unsigned v = a[i]; o0 |= (v & 0xFFu); o8 |= (v >> 8); }
  int P0 = 0; { unsigned w = o0; while (w) { P0 += (int)(w & 1u); w >>= 1; } }
  int P8 = 0; { unsigned w = o8; while (w) { P8 += (int)(w & 1u); w >>= 1; } }
  int pages = 50 * (1 + P0 + 33*P8);
  for (int i = 0; i < pages; i++) vbuf[i*4096] = (unsigned char)i;
  a[0] = (unsigned)(P0 + 5*P8);
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #189.962 ms156 MB + 272 KBWrong AnswerScore: 0


Judge Duck Online | 评测鸭在线
Server Time: 2026-11-08 09:42:39 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠