提交记录 27784


用户 题目 状态 得分 用时 内存 语言 代码长度
Izumi_Sagiri wc2017b3. 【WC2017】挑战-任务3 Time Limit Exceeded 75 3 s 2360 KB C++17 640 B
提交时间 评测时间
2025-01-21 03:20:26 2025-01-21 03:20:34
#include<cstring>
#include<algorithm>
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;
    }

CompilationN/AN/ACompile OKScore: N/A

Testcase #172.13 us28 KBAcceptedScore: 25

Testcase #2714.594 ms1 MB + 52 KBAcceptedScore: 25

Testcase #32.661 s1 MB + 976 KBAcceptedScore: 25

Testcase #43 s2 MB + 312 KBTime Limit ExceededScore: 0


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