发现的最大的异或子阵列的价值 [英] finding the value of maximum xor subarray
问题描述
由于整数数组(0℃= A [1] - = 10 ^ 9)和(1< = I< = 5 * 10 ^ 5),我试图找到最大的XOR subrray价值。 此外,如果该值小于所述阵列的最大元件越小,则该元素的值被返回,而不是异或值
Given an array of integers (0<= A[i] <= 10^9) and (1<=i<=5*10^5), I'm trying to find the value of maximum xor subrray. Also, if the value is smaller than the largest element of the array, then the value of that element be returned rather than the xor value.
我已经使用kedane的算法最大子阵列的问题尝试。据一些测试案例失败的,我不能够找出!
I've tried using the kedane's algorithm for maximum subarray problem. It is failing on some test cases, I'm not able to figure out!
时的一些其他的方法来吗?
Is their some other approach for this?
推荐答案
ü必须做它线索的帮助下,和kadane工程我想,ü可以使用DP为10 ^ 4的情况下为$ C $最大金额cchef竞赛题
U must do it with the help of trie,and kadane works for maximum sum i guess, u could use dp for 10^4 case for the codechef contest problem
这篇关于发现的最大的异或子阵列的价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!