#Lutece1860. Will the circle be broken
Will the circle be broken
Migrated from Lutece 1860 Will the circle be broken
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
You are given an array of non-negative integers and an integer .
Find the number of pair such that and $\min(A_i,A_{i+1},...,A_j) \cdot (A_i \oplus A_{i+1} \oplus ... \oplus A_j ) \leq M$.
Input
The first line contains two integers and .
The second line contains integers representing the elements of .
Output
Print the corresponding answer in a single line.
Samples
4 2
1 4 772002 200277
1
5 3
1 2 3 2 1
11
Resources
The 16th UESTC Programming Contest Preliminary