提交记录 27781


用户 题目 状态 得分 用时 内存 语言 代码长度
Izumi_Sagiri wc2017b3. 【WC2017】挑战-任务3 Compile Error 0 0 ns 0 KB C++17 604 B
提交时间 评测时间
2025-01-21 02:08:36 2025-01-21 02:53:24
typedef unsigned u32;
    u32 solve(int n, char *s)
    {
        int *pool = new int[2 * n + 3];
        memset(pool, 0, sizeof(int) * (2 * n + 3));
        pool += n;
        int *const start = pool;
        *pool = 1;
        for(int i = 1; i <= n; i++)
        {
            int len = std::min(i, n - i);
            if(s[i - 1] == '(')
                --pool;
            else if(s[i - 1] == ')')
                ++pool;
            else for(int j = (i & 1); j <= len; j += 2)
                    pool[j] = pool[j - 1] + pool[j + 1];
            pool[-1] = 0;
        }
        return *pool;
    }
f

CompilationN/AN/ACompile ErrorScore: N/A


Judge Duck Online | 评测鸭在线
Server Time: 2025-02-05 20:46:26 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠