Count Subarrays XOR K

Python Hard 4 views
Back to Questions

Problem Description

Read n integers and target K. Count number of subarrays with bitwise XOR exactly K. Output the count.

Input Format

First line n K. Second line n integers.

Output Format

One integer count.

Sample Test Case

Input:
5 6 4 2 2 6 4
Output:
4

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev