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?


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


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.

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:


found these too.

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

No body gave solutions though in these questions and in the 1st link the solution given is n^2 which won’t work.

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

Yes, I mailed them.

Any type of Reply?

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).


Not yet. No reply. I’ll tell you when I receive it.