提交记录 18767
提交时间 |
评测时间 |
2022-12-14 15:13:17 |
2022-12-14 15:13:23 |
#define u32 unsigned
#define fo(i,x,y) for(int i = x;i <= y;++i)
u32 g[540010],*f = g + 270000;
u32 solve(int n, char *s)
{
u32 cnt = 0,l = 0;
f[0] = 1;
int x = 0;
fo(i,1,n)
{
x ^= 1;
int en = n - i;
if(i < en) en = i;
if(s[i - 1] == '(') --f;
else if(s[i - 1] == ')') ++f;
else {for(int j = x;j <= en;j += 2) f[j] = f[j - 1] + f[j + 1];}
f[-1] = 0;
}
return f[0];
}
Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
Testcase #1 | 68.09 us | 36 KB | Accepted | Score: 25 | 显示更多 |
Testcase #2 | 714.93 ms | 384 KB | Accepted | Score: 25 | 显示更多 |
Testcase #3 | 2.662 s | 692 KB | Accepted | Score: 25 | 显示更多 |
Testcase #4 | 3 s | 812 KB | Time Limit Exceeded | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2025-09-16 19:02:24 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠