KMXOR - Editorial

okay thanks :slight_smile:
u ll cuz its my first attempt :smiley:

Thank you so much @vijju123
It was a great help for me… :smiley:

1 Like

Happy to help bro :slight_smile:

1 Like

Will reply u on ur comment on my editorial shortly…

alright! will wait. Thankyou. :slight_smile:

Well thank me if I solve it :slight_smile:

solved… keeping k==1 k==2 and k==3 condition before n==2 helps… (because 2 1 test case failed…)

try this test case and do let me know if there wasn’t any mistake…

all above test cases pass …
plz if possible check for once …
I even type-casted pow function value to long long …

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

thnx in advance …

this is the edited one with minor changes …
plz see whats the mistake
i am getting WA …

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

Okay bro you do have read above answer… that’s nice… let me check…

i have further modified the code …
plz check …
CodeChef: Practical coding for everyone
i have got many WA …

plz help …
thnx in advance !!!

HERE is my unofficial editorial(I have described whole soln there)
my solution was almost same as this editorial soln…

try this test case and have a look at editorial(unofficial) if u r not missing anything(specially corner cases that I mentioned)…

I m getting right answers in all the test cases mentioned above.Please have a look.
1 1 1 1
1 1 1 1 1
1 2 1 1 1
2 1 1 1 1 1
3 1 1 1 1
2 1 1 1 1 1
1 2 12 1 1
8 7
8 7 1 1

your logic and output seems correct… dk what does codechef found wrong :frowning:

post queries about what you didn’t understood in editorials… and also you can have a look at my editorial for this question

#HERE

Your editorial is not showing.

Here is the new link
Previous link was not working because old discuss was replaced.

Thanks for good editorial