Education + Jobs Hiring Website - 2025
0 like 0 dislike
2,276 views
Given an array 'A' of size 'N' ; find the sum of xor of all pairs of the given array .

 

1<=N<=100000

1<=a[i]<=100000000

 

Input :

5

2 7 1 5 8

Output : 2xor7 + 2xor1 + 2xor5 + 2xor8 + 7xor1 + 7xor5 + 7xor8 + 1xor5 + 1xor8 + 5xor8 = 74
in Online Assessments by Expert (147,320 points)
edited by | 2,276 views

Please log in or register to answer this question.