ProblemDescriptionXORisakindofbitoperator,wedefinethatasfollow:fortwobinarybasenumberAandB,letC=AXORB,thenforeachbitofC,wecangetitsvaluebycheckthedigitofcorrespondingpositioninAandB.Andforeachdigit,1XOR1=0,1XOR0=1,0XOR1=1,0XOR0=0.Andwesimplywritethisoperatoras^,like3^1=2,4^3=7.XORisanamazingoperatorandthisisaquestionaboutXOR.WecanchooseseveralnumbersanddoXOR...
近期评论