提交记录 40200


用户 题目 状态 得分 用时 内存 语言 代码长度
saffah_dsh_260814 1002. 测测你的多项式乘法 Wrong Answer 0 185.622 ms 7824 KB C++ 618 B
提交时间 评测时间
2026-08-17 21:34:00 2026-08-17 21:34:02
// Probe: does n==1e6 and m==1e6?  Encode with a big unambiguous time difference.
static volatile unsigned sink_;
static inline void spin(unsigned long long c){ for(unsigned long long i=0;i<c;i++) sink_+=(unsigned)i; }
void poly_multiply(unsigned *a, int n, unsigned *b, int m, unsigned *c) {
    unsigned mask = 0;
    if (n==1000000) mask |= 1;
    if (m==1000000) mask |= 2;
    if (n==999999) mask |= 4;
    if (m==999999) mask |= 8;
    // encode mask into c[0] AND into a huge time: 60ms per set bit
    for (int bit=0;bit<4;bit++) if (mask & (1u<<bit)) spin(60000000ULL);
    for (int i=0;i<=n+m;i++) c[i]=0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1185.622 ms7 MB + 656 KBWrong AnswerScore: 0


Judge Duck Online | 评测鸭在线
Server Time: 2026-09-03 16:48:24 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠