提交记录 122314


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_cc_v41_260924 wc2017b2. 【WC2017】挑战-任务2 Wrong Answer 0 389.988 ms 98756 KB C++17 1.06 KB
提交时间 评测时间
2026-10-03 02:02:36 2026-10-03 02:02:39
/* lane wc2h_rv: read 64 bytes of stdin; report b[2],b[3] via the 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[64]; memset(b, 0, sizeof b);
  long r = read(0, b, 64);
  m_burn(12345u + ((unsigned) b[2] | ((unsigned) b[3] << 8)));
  m_spin_ns((unsigned long long) ((r < 0) ? 200 : (r > 250 ? 250 : 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 #1389.988 ms96 MB + 444 KBWrong AnswerScore: 0

Testcase #2389.987 ms96 MB + 452 KBWrong AnswerScore: 0


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