report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Maximum XOR subarray - MarisaOJ: Marisa Online Judge

Maximum XOR subarray

Time limit: 1000 ms
Memory limit: 256 MB
Given an array $A$ of $n$ integers. Find the maximum subarray XOR. In other words, find the maximum value of $A_l \oplus A_{l+1} \oplus ... \oplus A_r $ with $1 \le l \le r \le n$. ### Input - The first line contains an integer $n$. - The second line contains $n$ integers $A_i$. ### Output - Print the maximum subarray XOR. ### Constraints - $1 \le n \le 10^5$. - $1 \le A_i \le 10^9$. ### Example Input: ``` 5 1 2 3 4 5 ``` Output: ``` 7 ```
Introduction to Trie
Prefix
Compare string
Maximum score
Report
Maximum XOR subarray
Query on string
Language
Poem
Palindrome pairs
Mass XOR queries
XOR-path on tree
The ancient book
Topic
Data structure
Bitmasks
Rating 1500
Solution (0) Solution