bitwise xor of n no...internship questn

given n and x:

make an array of natural no whose bitwise xor of all no =x and the sum of while array should be minimum possible...and lexigraphically smmalest...

constraints..

0<=n<=1e5
1<=x<=1e18



given test case:(n and x)
i/p :
3 2

o/p
1 1 2
mmm, have chef make me a sammitch while I don't work on this.
I'm going to copy-paste what I wrote for the other codechef problem in General.

A good way of getting help in ANY walk of life is to show that you're struggling before asking for help. To struggle, you need to actually try to do something.

If you post code that you've written so far and it's anything more than a bare skeleton, that'll be more likely to get you help.

That said, this is a codechef problem, and I'm pretty sure it's against the spirit (and/or rules) of that site to get help from other people to boost your rank, so... good luck!

-Albatross
Topic archived. No new replies allowed.