KMXOR - Editorial (Unofficial) (As i know many of you were near to the solution and you r getting wrong answers)

I am getting right in all the test case mentioned above but still getting wa
3Et80h - Online C++0x Compiler & Debugging Tool - Ideone.com please have a look at it.

Hey @l_returns ,

I went through your editorials, and edited the first half to what would seem ideal to me. You can refer to that, and then at the latter part of the editorial to check the differences, and note formatting syntax etc. :slight_smile:

Some things I would like to point out-

  1. I love your spirit of explanation. But it is an art to know when to explain very elaborately and when to refrain from that. What we call, Abstraction. :). I loved how you went on to tell the trick in detail, but at the same time, as you can see from editing history, I removed a bit of redundant explanations from the editorial. Too much of redundant explanation, where things are trivial bores the reader, and makes him feel as if editorialist is assuming him to be a kid/total-noob. Not to mention it unnecessarily makes the editorial lengthy!
  2. Formatting and presentation can be improved. Check out the format of latex etc. from the part I edited. :slight_smile:
  3. A few typos, but thats fine. Make sure there are no typos in headings.

Elaborating n point 1, even I did that when I wrote my very first unofficial editorial. I was a 2 star then, and was able to solve the question after looking at people’s code XD. Check it out here- FEB-17, MAKETRI Editorial (Unofficial) - editorial - CodeChef Discuss

See its such an extreme case of elaborate explanation! XD Criticthat editorial, see how it can be improved, and in the process see if you did that mistake as well! Thats all, I appreciate your sincere efforts :slight_smile:

1 Like

Can someone please tell me which test case fails for KMXOR for the following code?

It passes all the below mentioned test cases and I am still getting WA.

9

4 1

5 1

5 2

6 2

5 3

6 3

5 8

2 8

4 8

nicely explained bro :slight_smile:

Hello @L_returns could you please point out mistake in my logic

https://www.codechef.com/viewsolution/18617541

https://www.codechef.com/viewsolution/18645512

What is wrong with this solution? Can you please help!

hello @prnjl_rai

your code is giving wrong answer when ‘n’ is odd and k=3.
Add some more cases to it.

So well explained… loved it! :slight_smile:

This explanation is really helpful. This editorial is clearer than the Official one!

link text

can someone help i got all test cases of above correct

PS: sorry I saw the official editorial after I posted this one… Now I think I should let it be as maybe someone can get a help…

1 Like

Its my first attempt for writing editorial so please forgive me for my english and length of editorial…

1 Like

Thanks, I_returns. I almost solved the question just missed the edge cases! and lost 100 ratings got back to Div B :frowning:

ohh… welcome :slight_smile:

perfect, thanks for pointing out the edge cases. Finally got AC.

welcome :slight_smile:

for "5 8 " you forgot to print two one’s …

okay sure… give me some minutes…

Your logic is correct… got AC after some typecasting…

just type cast the output of pow(x,y) function to (ll) and that’s it…