for(i=1; i<=n;i++){ for(j=i+1; j<=n;j++) if(a[j]>A[i]) swap (a[i],a[j]); if(!a[i]) Break; for(j= -; j>=0; j--) if(a[i]>>j&1) { for(k=1; k<=n;k++) if(I!=k && (a[k]>>j&1)) a[k]^=A[i]; Break; }}
In this code think (Dan) test (Teng) for a week ...
UPD: like these two codes do the same thing? After that, the top of each number is only one 1. t_t who can tell me what the difference is between these two codes? What's the use? And why would you do that?
for (int i=1; i<=n;i++) for (int j=; j>=1; j--) {if(a[i]>> (J1) & 1 { if(!lb[j]) {lb[j]=a[i]; break;} else a[i]^=lb[j];} }
Let's prove why any one of the array of a after the elimination of the meta-selection corresponds to an alternative method of the original array? (SX problem, God Ben Please ignore t_t)
If we have a set s=[x,s-{x}], then a scheme selected for the set S can correspond to S ' =[x,{y^x|y∈{s-{x}}]
Make S-{x}=a,{y^x|y∈{s-{x}}}=b
Because if this program
1) Select X
i) In addition to the odd number of elements in a, then the scheme in S ' is not selected x, the corresponding element is selected in B
II) also select an even number of elements in a, then S ' Scheme corresponds to select X, select the corresponding element in B
2) do not select X
i) Select an odd number of elements in a, then the scheme in S ' is selected as x and the corresponding element in B
II) In addition to an even number of elements in a, then the scheme in S ' is not selected x, the corresponding element in B is selected
So this is one by one correspondence. So we can arbitrarily use a certain equation to take the different or other equations, selected and not selected or independent and legal.
Hey How do I think of the elementary transformation of matrices? )
Ask the great God to give a simple proof t_t
Gaussian elimination and Xor equations