Cheaters using StackOverflow

I was reading a solution for PSHTBRTH and found a referrence to following StackOverflow link. Note that this question was asked on March 6, 2017 (during the contest).

Therefore, all those contestants whose code is similar to the code given on StackOverflow should be counted as cheaters and it should be added to rules that if any contestant is caught asking or using StackOverflow to ask contest question during the contest then he would be counted as cheater.


No wonder why there were so many submissions -_-

1 Like

I was going through successful submissions and found that some people have stored precalculated grundy numbers in arrays and then just used bit/segment trees to answer the queries
source for the grundy numbers maybe this [link][1]

EDIT: Note that this question was asked on 4th March


EDIt- Yeah found it . Its surely against the rules. The rules say-

Discussing CodeChef's problems or any aspect of problem, on any other platform on web, on identification, could lead to disabling of respective account and banning from the community.

Please do not discuss strategy, suggestions or tips in the comments during a live contest. Posting questions clarifying the problem statement is ok. If you are unsure, email us at .

But one thing, you cannot count “all” submissions submitted after 6 march who follow that logic as cheaters. Majority didn’t even know that there was such a Q asked (else it would had been reported to us, like what happened in Feb Long). Its not that simple. You cannot punish an innocent guy just cause his code was similar to a cheaters. Its best left to admins to decide and its good that you bought it to the notice. :slight_smile:


Why didn’t anyone say that it was related to codechef MARCH17 on the question page on stackoverflow?



found these too

1 Like

It’s even possible that the cheaters took the information from there and didn’t copy the code. I don’t think your idea is good. But one thing we can do is to cancel all the submissions of that problem in the contest and see the results based on the other problems.


found these too.

Don’t worry! This question will be deleted or will not be consider in calculating the rating.

Is there anyone who had already report this issue through email? Since in previous contest two questions has been deleted because both of them are already available on Such a websites. I even personally report them about one the question through email. Since it was already given on HACKERRANK, after that they removed the question within days. The same case has been occurred here.

If this severe issue will continue like this in every contest then i don’t think that any will show interest in Long Challenge

It was asked by Narendra Modi and his account should be suspended immediately also the account of his bhakts(to whom he indirectly helped) should also be suspended . I hope the innocent who spent a considerable time in solving the question will not suffer. Codechef need to handle cases like asking question on public forums very strictly and ban corrupt people like Narendra Modi(the person who asked this question).


Don’t worry! This question will be deleted or will not be consider in calculating the rating.

As one of the organizers, I’m saying that this isn’t true.
It’s bad that some participants cheated but it didn’t affect the leaderboard that much.

We’re sorry about the situation.
Maybe we will try to find such topics during the contest next time, but it’s hard to say how efficiently we can do it.
The sad thing is that cheating will always exist in online contests (we will try to fight with it though).
Of course, you should remember that in the long run people playing fair are stronger because they spent more time thinking and thus learning.


Some1 even asked for the SCHEDULE question on stackoverflow (though nt answered )…

can’t understand why just for the sake of getting more marks or better rank people are defeating the purpose of CODECHEF…

1 Like

I was going through the questions this person(Narendra Modi) asked previously, it turns out he did that previously as well.
for the question:

He asked:

Which is on 4th of April, last year when the contest was going on… he may have asked more during other contests as well. Can an account be reported on stackoverflow, if it does it should be. Whoever he is using wrong name as well.

1 Like

The biggest problem is that we have no way to catch someone who asked a question on stack over flow.
He can just ask a question with some random user name. If someone answers him, he gets the answer. But even if someone doesn’t give the answer, its no loss for him and he can just try again.

1 Like

I guess most of us found the link today, and those who found it during contest didn’t report it but rather used it for getting AC.

1 Like

I agree with @damseghal. ITs still good that, we did found a link within appropriate time. I sincerely hope for the best in interest of coders. :slight_smile:

I found the link to math exchange yesterday but the code had been removed already only the output was there (65536 numbers)
I had no idea that people would (or could) compress that output in patterns(source limit 50kb) and use it to get AC xD

1 Like

this is a bad idea for the people who actually did it on their own will suffer because of cheaters.
I saw around 100+ submissions and there were like 5-6 cheaters.
So maybe 50-60 people have cheated.
So 400 people suffering because of these 50-60 would not be nice


Nice findings but fortunately nobody provided the askers with a solution :slight_smile:

I also saw that link, and from there I learnt about the sprague-grundy numbers. as for the bitmasks and rectangle bitmask generation, I had already though of that.Also, there a lot of change would have been required, due to which I wrote the code completely myself. I don’t think that everyone whose code looked similar should be penalized because you could not do much of it in any different way. As per me, admin should remove that question.

1 Like