A Sum Of Bitwise Xor Problem

Правка en1, от EternalFire, 2018-09-26 09:17:24

Given an array A consist of N integers (N <= 100000, 0 <= Ai <= sqrt(i) for 1 <= i <= N). Count the number of triple (i, j, k) such that i <= j <= k and (Ai xor Aj xor Ak) = 0.

I tried many approaches but I couldn't optimize my O(N^2) solution. Is there any efficient algorithm to solve this problem?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский EternalFire 2018-09-26 09:17:24 331 Initial revision (published)