Interesting Xor || IRSTXOR || Full Solution With Code in C++ || Codechef Long Challenge 2021

Опубликовано: 18 Март 2026
на канале: Aj
2,946
39

PAPARAZZI GENNADY 100 POINT FULL SOLUTION IN C++ :    • PAPARAZZI GANNADY || 100 Point Confirm || ...  
College Life 4 Full 100 Point Solution :    • COLLEGE LIFE 4 || 100 POINT CONFIRM || Cod...  

Interesting Xor 100 Point Optimized :    • Interesting XOR Optimized Solution || 100 ...  
College Life 4 Loop Based Solution :    • College Life 4 Loop Bases Solution  
Space Arrays :    • Space Arrays || 100 Point || SPACEARR ||  ...  
College Life 4 Greedy Approach :    • College Life 4 Greedy Approach | Full Solu...  
College Life 4 :    • College Life 4 || COLGLF4 || Codechef Marc...  
SPACE ARRAYS :    • SPACE ARRAYS || SPACEARR || Codechef long ...  
Interesting Xor :    • Interesting Xor || IRSTXOR || Full Solutio...  
Chef And Groups :    • Chef And Groups || Codechef Long Challenge...  
No Time To Wait :    • No Time To Wait || Approach, Idea, Code wi...  

March Long Challenge 2021 Solution Full Playlist :    • MARCH LONG CHALLENGE 2021 😍😍😍   IRSTXOR
Interesting Xor !

C less than symbol pow(2,d)

A^B = C

find Max Of A*B

Hello Guys
Today i am solving interesting xor problum of march long challenege 2021

so in this question we must required knowledge of xor properties as bellow
0 XOR 0 = 0
0 XOR 1 = 1

1 XOR 0 = 1
1 XOR 1 = 0

so to solve this question first count the no. of bit in given input C

then set one varible as max no. made with this size of bit-1 bit

so our A = pow(2,no. of bit in C - 1)

then to find B we use properties

as A XOR B = C
xoring both the side A
it give us

A XOR A XOR B = A XOR C

here

A XOR A = 0

so put in above equation give us

0 XOR B = A XOR C

and with halp of table any No.'s XOR with 0 give that no. as it is

so B = A XOR C

then multiply A&B and print the ans.

Input :
2
13
10

Output
70
91

EXTRA TEST CASE
2
31
100

ANS
240
5733

so this is ans we required
submit it
it will give 100 point full point

KEEP LEARNING
KEEP CODING
HAPPY CODING :)))))))