I don’t know where i am getting wrong with my code can anybody can figure it out please
[Click here for my code][2]
Thank’s a lot.
[2]: https://www.codechef.com/viewplaintext/18643808
I don’t know where i am getting wrong with my code can anybody can figure it out please
[Click here for my code][2]
Thank’s a lot.
[2]: https://www.codechef.com/viewplaintext/18643808
@1_returns we have to print exactly N numbers
bro… print n numbers do their xor in your mind or on paper and compare with answers… the obvious and simple reason of writing XOR in my test case as answer is there can be multiple answers…
Even the codechef server checks this solution that way I guess… the server also only have the value of XOR and when you output n numbers It just XOR them and compare…
anyways I tried your soln and I got 4 test cases wrong out of 9 mentioned in above link… they were
4
4 1
5 1
5 2
5 8
Check you error and ask me if u still have any doubt…
the outputs were out of bounds… i.e they were not between 1 to k (including 1 and k)