提交记录 18770


用户 题目 状态 得分 用时 内存 语言 代码长度
Minion wc2017b3. 【WC2017】挑战-任务3 Time Limit Exceeded 75 3 s 812 KB C++11 767 B
提交时间 评测时间
2022-12-14 15:42:49 2022-12-14 15:42:54
#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
		{
			int J = x;
			for(int j = x;j + 16 <= en;j += 16)
			{
				f[j] = f[j - 1] + f[j + 1];
				f[j + 2] = f[j + 1] + f[j + 3];
				f[j + 4] = f[j + 3] + f[j + 5];
				f[j + 6] = f[j + 5] + f[j + 7];
				f[j + 8] = f[j + 7] + f[j + 9];
				f[j + 10] = f[j + 9] + f[j + 11];
				f[j + 12] = f[j + 11] + f[j + 13];
				f[j + 14] = f[j + 13] + f[j + 15];
				J = j + 16;
			}
			for(int j = J;j <= en;j += 2) f[j] = f[j - 1] + f[j + 1];
		}
		f[-1] = 0;
	}
	return f[0];
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #160.43 us36 KBAcceptedScore: 25

Testcase #2563.116 ms384 KBAcceptedScore: 25

Testcase #32.121 s692 KBAcceptedScore: 25

Testcase #43 s812 KBTime Limit ExceededScore: 0


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