Tap here to switch tabs
Problem
Submissions

Problem: Count Triplets with Even XOR Set Bits II

Try to solve the Count Triplets with Even XOR Set Bits II problem.

Statement

Given three integer arrays a, b, and c, return the number of triplets (i, j, k) such that the bitwise XOR sum a[i] ^ b[j] ^ c[k] contains an even number of set bits in its binary representation.

Constraints:

  • 1≤1 \leq a.length, b.length, c.length ≤105\leq 10^5

  • 0≤0 \leq a[i], b[i], c[i] ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Triplets with Even XOR Set Bits II

Try to solve the Count Triplets with Even XOR Set Bits II problem.

Statement

Given three integer arrays a, b, and c, return the number of triplets (i, j, k) such that the bitwise XOR sum a[i] ^ b[j] ^ c[k] contains an even number of set bits in its binary representation.

Constraints:

  • 1≤1 \leq a.length, b.length, c.length ≤105\leq 10^5

  • 0≤0 \leq a[i], b[i], c[i] ≤109\leq 10^9