提交记录 110433


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_cc_v41_260924 1001. 测测你的排序 Wrong Answer 0 63.884 ms 6416 KB C++17 827 B
提交时间 评测时间
2026-09-29 08:39:57 2026-09-29 08:40:02
/* fh1 1001 WA PROBE -- dead-bit map of the judge's array.
   pages = 50 * (1 + P + 33*T)
       P = popcount( OR over i of a[i] )      bits that are EVER 1        (0..32)
       T = index of the lowest bit that is EVER 1 (trailing zeros of the OR) (0..32)
   mem_kb = 12 + 4*pages.  Scaled x50 so the program-dependent base (~8-12 KB) is noise. */
static volatile unsigned char vbuf[(50*(1+32+33*32) + 8)*4096] __attribute__((aligned(4096)));
void sort(unsigned *a, int n) {
  unsigned aor = 0;
  for (int i = 0; i < n; i++) aor |= a[i];
  int P = 0; { unsigned w = aor; while (w) { P += (int)(w & 1u); w >>= 1; } }
  int T = 0; { unsigned w = aor; while (w && !(w & 1u)) { T++; w >>= 1; } }
  int pages = 50 * (1 + P + 33*T);
  for (int i = 0; i < pages; i++) vbuf[i*4096] = (unsigned char)i;
  a[0] = (unsigned)(P + 7*T);
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #163.884 ms6 MB + 272 KBWrong AnswerScore: 0


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