提交记录 18775


用户 题目 状态 得分 用时 内存 语言 代码长度
Minion wc2017b2. 【WC2017】挑战-任务2 Wrong Answer 0 3 s 18364 KB C++11 835 B
提交时间 评测时间
2022-12-14 16:19:06 2022-12-14 16:19:11
#define u32 unsigned
#define u64 unsigned long long
#define fo(i,x,y) for(int i = x;i <= y;++i)
#define pop __builtin_popcountll
u64 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 - 64) fo(j,0,2) fo(k,0,63) b1[i][j] = b1[i][j] << 1 | (s1[i + k] == j);
	fo(i,0,n - 64) fo(j,0,2) fo(k,0,63) 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];
		ans[i] = 0;
		if(l == 0) continue;
		int J = 0;
		for(int j = 0;j + 65 <= l;j += 64)
		{
			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 #1634.82 us92 KBWrong AnswerScore: 0

Testcase #23 s17 MB + 956 KBTime Limit ExceededScore: 0


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