random answer. Computer science. Ksenia has an exhibit a comprising of n positive integers a1,a2,… ,an. In one activity she can do the accompanying: pick three particular records I, j, k, and afterward change all of ai,aj,ak to ai⊕aj⊕ak all the while, where ⊕ means the bitwise XOR activity.
Correct answer will be upvoted else Multiple Downvoted. Don't submit random answer. Computer science.
Ksenia has an exhibit a comprising of n positive integers a1,a2,… ,an.
In one activity she can do the accompanying:
pick three particular records I, j, k, and afterward
change all of
She needs to make all computer based intelligence equivalent in at most n activities, or to establish that it is difficult to do as such. She wouldn't request your assistance, yet kindly, help her!
Input
The principal line contains one integer n (3≤n≤105) — the length of a.
The subsequent line contains n integers, a1,a2,… ,an (1≤ai≤109) — components of a.
Output
Print YES or NO in the principal line contingent upon whether it is feasible to make all components equivalent in at most n tasks.
In case it is conceivable, print an integer m (0≤m≤n), which means the number of activities you do.
In every one of the following m lines, print three particular integers i,j,k, addressing one activity.
In case there are numerous such activity arrangements conceivable, print any. Note that you don't need to limit the number of tasks.
Step by step
Solved in 4 steps with 1 images