You are given NN distinct points in a 22-D plane, numbered 11 through NN. The X-coordinate of the points are X1,X2,…,XNX1,X2,…,XN respectively and the Y-coordinates are Y1,Y2,…,YNY1,Y2,…,YN respectively. Your goal is to make the location of all the NN points equal to that of each other. To achieve this, you can do some operations. 100% correct solution

2-D Point Meeting solution codechef You are given NN distinct points in a 22-D plane, numbered 11 through NN. The X-coordinate of the points are X1,X2,…,XNX1,X2,…,XN respectively and the Y-coordinates are Y1,Y2,…,YNY1,Y2,…,YN respectively. Your goal is to make the location of all the NN points equal to that of each other. To achieve this, you can do some operations. In one operation, you choose … Read more

You are given an array AA consisting of NN integers and an integer XX. Your goal is to have as many equal integers as possible in the array. To achieve this goal, you can do the following operation: Choose an index ii (1≤i≤N)(1≤i≤N) and set Ai=Ai⊕XAi=Ai⊕X, where ⊕⊕ denotes the bitwise xor operation. Find the maximum number of equal integers you can have in the final array and the minimum number of operations to obtain these many equal integers. 100% correct solution

XOR Equal solution codechef You are given an array AA consisting of NN integers and an integer XX. Your goal is to have as many equal integers as possible in the array. To achieve this goal, you can do the following operation: Choose an index ii (1≤i≤N)(1≤i≤N) and set Ai=Ai⊕XAi=Ai⊕X, where ⊕⊕ denotes the bitwise xor operation. Find the maximum number of … Read more