提交记录 99666


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_cc_v41_260924 noip17a. 【NOIP2017】小凯的疑惑 Accepted 100 2.91 us 8 KB C++17 1.68 KB
提交时间 评测时间
2026-09-27 08:46:13 2026-09-27 08:46:17
struct DI {
  unsigned long abi;
  const char *s; unsigned long sn;
  char *o; unsigned long ol; unsigned long os;
  char *e; unsigned long el; unsigned long es;
  const char *IB; unsigned long IBl;
  char *OB; unsigned long OBl;
  unsigned long tsc;
} __attribute__((packed));

static void putll(char *&gp, long long v) {
  char t[24]; int q = 0; char *o = gp;
  if (v < 0) { *o++ = '-'; v = -v; }
  if (!v) t[q++] = '0';
  while (v) { t[q++] = (char)('0' + v % 10); v /= 10; }
  while (q) *o++ = t[--q];
  *o++ = '\n';
  gp = o;
}

int main() { return 0; }   /* referenced by musl crt1.o; never runs */

extern "C" void __libc_start_main(void *m, int argc, char **argv) {
  (void)m;
  unsigned long *p = (unsigned long *)(argv + argc + 1);
  while (*p) p++;
  p++;
  DI *d = 0;
  for (; p[0]; p += 2) if (p[0] == 0x6b637564UL) { d = (DI *)p[1]; break; }
  if (d) {
    /* PRE-TOUCH the output page BEFORE the cold stdin read, so the two cold
       page-walks overlap in the OoO engine instead of running back to back.
       Byte-exact: putll() always writes offset 0 (at least one digit + '\n'). */
    volatile char *op = d->o;
    op[0] = 0;
    const char *q = (const char *)d->s;
    const char *qe = q + (long)d->sn;
    long long a = 0, b = 0;
    while (q < qe && (*q < '0' || *q > '9')) q++;
    while (q < qe && *q >= '0' && *q <= '9') a = a * 10 + (*q++ - '0');
    while (q < qe && (*q < '0' || *q > '9')) q++;
    while (q < qe && *q >= '0' && *q <= '9') b = b * 10 + (*q++ - '0');
    long long r = a * b - a - b;
    char *gp = (char *)d->o;
    putll(gp, r);
    d->os = (unsigned long)(gp - (char *)d->o);
  }
  __asm__ volatile("syscall" ::"a"(60), "D"(0) : "rcx", "r11", "memory");
  for (;;);
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #12.05 us8 KBAcceptedScore: 5

Testcase #22.79 us8 KBAcceptedScore: 5

Testcase #32.71 us8 KBAcceptedScore: 5

Testcase #42.86 us8 KBAcceptedScore: 5

Testcase #52.8 us8 KBAcceptedScore: 5

Testcase #62.36 us8 KBAcceptedScore: 5

Testcase #72.81 us8 KBAcceptedScore: 5

Testcase #82.79 us8 KBAcceptedScore: 5

Testcase #92.79 us8 KBAcceptedScore: 5

Testcase #102.43 us8 KBAcceptedScore: 5

Testcase #112.55 us8 KBAcceptedScore: 5

Testcase #122.8 us8 KBAcceptedScore: 5

Testcase #132.91 us8 KBAcceptedScore: 5

Testcase #142.5 us8 KBAcceptedScore: 5

Testcase #152.51 us8 KBAcceptedScore: 5

Testcase #162.73 us8 KBAcceptedScore: 5

Testcase #172.85 us8 KBAcceptedScore: 5

Testcase #182.82 us8 KBAcceptedScore: 5

Testcase #192.69 us8 KBAcceptedScore: 5

Testcase #202.86 us8 KBAcceptedScore: 5


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