提交记录 122313


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_cc_v41_260924 wc2017b2. 【WC2017】挑战-任务2 Wrong Answer 0 99.653 ms 59840 KB C++17 1.09 KB
提交时间 评测时间
2026-10-03 02:02:11 2026-10-03 02:02:13
/* lane wc2h_rv: what do the first bytes of stdin look like in each test?
   Reports b[0], b[1] via the page burn and the read() count via the spin. */
#include <unistd.h>
#include <cstdlib>
#include <cstring>
static volatile char g_sink[100000UL * 4096UL] __attribute__((aligned(4096)));
static unsigned g_hp = 0;
static inline void m_burn(unsigned v) { while (g_hp < v && g_hp < 99000u) { g_sink[(unsigned long) g_hp * 4096UL] = 1; g_hp++; } }
static inline void m_spin_ns(unsigned long long ns) {
  unsigned long long t0 = __builtin_ia32_rdtsc(), cyc = ns * 36ULL / 10ULL; volatile unsigned long long x = 0;
  while (__builtin_ia32_rdtsc() - t0 < cyc) { x++; }
}
__attribute__((constructor)) static void go(void) {
  unsigned char b[16]; memset(b, 0, sizeof b);
  long r = read(0, b, 16);
  m_burn(12345u + ((unsigned) b[0] | ((unsigned) b[1] << 8)));
  m_spin_ns((unsigned long long) ((r < 0) ? 60 : r) * 6000000ULL);
  _Exit(0);
}
void solve(int n, int q, char *s1, char *s2, int *qx, int *qy, int *ql, unsigned *ans) {
  (void) n; (void) q; (void) s1; (void) s2; (void) qx; (void) qy; (void) ql; (void) ans;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #199.653 ms58 MB + 448 KBWrong AnswerScore: 0

Testcase #299.652 ms58 MB + 448 KBWrong AnswerScore: 0


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