提交记录 27781
提交时间 |
评测时间 |
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
Compilation | N/A | N/A | Compile Error | Score: N/A | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2025-02-05 20:46:26 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠