[Solution] The Subarray XOR CodeChef Solution
Given an array having elements, a subarray of is called
Find the length of the smallest subarray which is
good
if , where denotes the bitwise XOR of all the elements of the subarray .Find the length of the smallest subarray which is
good
. If there is no good
subarray, print instead.Input Format
- The first line of input contains a single integer , denoting the number of test cases. The description of the test cases follows.
- The first line of each test case contains two space-separated integers and - as described in the problem statement.
👇👇👇👇👇
- The second line of each test case contains space-separated integers , representing the elements of the array .
Output Format
For each test case, output in a single line, the length of the shortest subarray which is good
. If there
Complementary Strand in a DNA CodeChef Solution
Make all equal using Pairs Codechef Solution
Count the ACs CodeChef Solution
Strong Elements CodeChef Solution
Reversal Sorting CodeChef Solution
The Subarray XOR CodeChef Solution
is no good
subarray, print .
Constraints
- Sum of over all test cases does not exceed .
No comments:
Post a Comment