提交记录 18764


用户 题目 状态 得分 用时 内存 语言 代码长度
Minion wc2017b2. 【WC2017】挑战-任务2 Wrong Answer 0 3 s 11508 KB C++11 788 B
提交时间 评测时间
2022-12-14 15:01:09 2022-12-14 15:01:13
#define u32 unsigned
#define fo(i,x,y) for(int i = x;i <= y;++i)
#define pop __builtin_popcount
u32 b1[300010][3],b2[300010][3];
void solve(int n, int q, char *s1, char *s2, int *q_x, int *q_y, int *q_len, u32 *ans)
{
	fo(i,0,n - 1) s1[i] = (s1[i] - 47) % 3,s2[i] -= 48;
	fo(i,0,n - 32) fo(j,0,2) fo(k,0,31) b1[i][j] = b1[i][j] << 1 | (s1[i + k] == j);
	fo(i,0,n - 32) fo(j,0,2) fo(k,0,31) b2[i][j] = b2[i][j] << 1 | (s2[i + k] == j);
	fo(i,0,q - 1)
	{
		int x = q_x[i],y = q_y[i],l = q_len[i];
		if(l == 0) continue;
		int J = 0;
		for(int j = 0;j + 33 <= l;j += 32)
		{
			ans[i] += pop(b1[x + j][0] & b2[y + j][0]);
			ans[i] += pop(b1[x + j][1] & b2[y + j][1]);
			ans[i] += pop(b1[x + j][2] & b2[y + j][2]);
			J = j + 32;
		}
		fo(j,J,l - 1) ans[i] += (s1[x + j] == s2[y + j]);
	}
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1335 us64 KBWrong AnswerScore: 0

Testcase #23 s11 MB + 244 KBTime Limit ExceededScore: 0


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