Tap here to switch tabs
Problem
Submissions

Problem: Count Triplets with Even XOR Set Bits I

med
30 min
Try to solve the Count Triplets with Even XOR Set Bits I problem.

Statement

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

Constraints:

  • 1≤1 \leq a.length, b.length, c.length ≤100\leq 100

  • 0≤0 \leq a[i], b[i], c[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Triplets with Even XOR Set Bits I

med
30 min
Try to solve the Count Triplets with Even XOR Set Bits I problem.

Statement

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

Constraints:

  • 1≤1 \leq a.length, b.length, c.length ≤100\leq 100

  • 0≤0 \leq a[i], b[i], c[i] ≤100\leq 100