提交记录 27573


用户 题目 状态 得分 用时 内存 语言 代码长度
user1 wc2017b3. 【WC2017】挑战-任务3 Accepted 100 670.191 ms 4184 KB C++ 758 B
提交时间 评测时间
2024-12-27 17:23:48 2024-12-27 17:23:51
unsigned solve(int n, char *s) {
	unsigned int A[1000000] = {};
	unsigned int p = 1000001;
	A[500000] = 1;
	int i = 0;
	while (1) {
		switch (s[i++]) {
		case 0: goto end;
		case '(': --p; break;
		case ')': A[++p/2-1] = 0; break;
		case '?':
			unsigned* B = --p/2 + A;
			int m = 266670 - i;
			if (m>i) m=i;
			m /= 2;
			for (int j=0; j<m; j+=16) {
				asm volatile(
					"vmovupd 4(%0), %%ymm0; vmovupd 36(%0), %%ymm1;"
					"vmovupd 0(%0), %%ymm2; vmovupd 32(%0), %%ymm3;"
					"vpaddd %%ymm2, %%ymm0, %%ymm2; vpaddd %%ymm3, %%ymm1, %%ymm3;"
					"vmovupd %%ymm2, 0(%0); vmovupd %%ymm3, 32(%0);"
					: : "r"(B+j): "memory");
			}
	}	//printf("%d %d | %d %d %d %d\n", A[p/2-2], A[p/2-1], A[p/2], A[p/2+1], A[p/2+2], A[p/2+3]);
} end:;
	return A[p/2];
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1404.88 us3 MB + 852 KBAcceptedScore: 25

Testcase #2270.93 ms3 MB + 968 KBAcceptedScore: 25

Testcase #3637.417 ms4 MB + 48 KBAcceptedScore: 25

Testcase #4670.191 ms4 MB + 88 KBAcceptedScore: 25


Judge Duck Online | 评测鸭在线
Server Time: 2025-01-19 02:30:57 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠