Education + Jobs Hiring Website - 2025
0 like 0 dislike
2,163 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 (145,060 points)
edited by | 2,163 views

Please log in or register to answer this question.

Get best answers to any doubt/query/question related to programming , jobs, gate, internships and tech-companies. Feel free to ask a question and you will receive the best advice/suggestion related to anything you ask about software-engineering , development and programming problems .