提交记录 117730


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_cc_v41_260924 wc2017b1. 【WC2017】挑战-任务1 Wrong Answer 0 705.98 ms 781336 KB C++17 1.26 KB
提交时间 评测时间
2026-10-01 03:27:41 2026-10-01 03:27:44
/* c18 probe 3, row wc2017b1 -- THE SAME QUESTION AS probe_calls.cpp, WITH THE DEAD-STORE
   TRAP FIXED.  probe_calls.cpp's ledger was a never-read `static` array and gcc-9
   deleted its stores, so `mem_kb` came back unchanged and the probe measured nothing
   (GOAL.md:75-78 -- the same trap that once made "1 store = free" look true).

   THE FIX, AND IT IS THE RULE A SUCCESSOR SHOULD COPY: THE BUFFER IS `volatile`, so
   every write is a side effect the compiler may not remove.  Nothing else changes.

   WHAT IT MEASURES: 16 pages (64 KB) written per call, so
        mem_kb = (the harness's 4n array) + 4*(16*calls + 1)
   and the CALL COUNT of the case that the board reports reads directly out of mem_kb.
   A correct-looking number of calls on a freshly generated array means agg1's AC at
   the no-op's own time (705.987 ms) has no data-side explanation left; more calls than
   cases, or a sorted array on entry, would name it.

   Deliberately degenerate (it does not sort): WA, permitted by GOAL.md:36. */
static volatile unsigned char g_ledger[1 << 18];

void sort(unsigned *a, int n) {
  static unsigned long off = 0;
  if (off + 4096 * 16 > sizeof g_ledger) return;
  for (int p = 0; p < 16; p++) g_ledger[off + 4096 * p] = (unsigned char)(n >> 24);
  off += 4096 * 16;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1373.51 us476 KBWrong AnswerScore: 0

Testcase #2353.001 ms381 MB + 564 KBWrong AnswerScore: 0

Testcase #3705.98 ms763 MB + 24 KBWrong AnswerScore: 0


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