WA in KAMLIKE

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

@ssjgz will you have a look at my code

I’m about to head out, but after having a brief look:

i64 x=0;
 forn(i,10)
 x^=cnt[i];
 return ((x==0)?false:true);

This doesn’t seem right - if cnt for 0, 1, and 2 are e.g. 1, 2 and 3 respectively, then x will be 0, I think.

1 Like

Thanks for the feedback i didn’t think of that case

Uh… When you post your code on any public forum, you should at least care to explain why you posted it. If you want some help, you should at least try to explain your approach a bit. It might just turn out that your approach was wrong, and thus they can straightaway point that out, thus saving time and energy of both parties. Posting your code with just a blunt title and no explanations seems stupid, and to be honest, a bit rude too.

1 Like