You are not logged in. Please login at to post your questions!


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.

asked 13 Mar '17, 15:29

damsehgal's gravatar image

accept rate: 0%

edited 13 Mar '17, 18:13

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.


answered 13 Mar '17, 18:59

errichto's gravatar image

5★errichto ♦♦
accept rate: 30%


THANKS FOR CONFIRMATION!! Q getting deleted after contest would put people off as "who knows I may spend hours solving this and it wont count in the end..." because as you rightly remarked, cheating in online contest is tough to eradicate completely. I simply hope that the decision you all take results in best of all of us. Thanks one again!! :)

(13 Mar '17, 19:19) vijju123 ♦♦5★

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


answered 13 Mar '17, 15:44

vijju123's gravatar image

5★vijju123 ♦♦
accept rate: 18%

edited 13 Mar '17, 15:47

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

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


answered 13 Mar '17, 15:42

swetankmodi's gravatar image

6★swetankmodi ♦♦
accept rate: 15%

edited 13 Mar '17, 16:20

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


answered 13 Mar '17, 15:57

prakhar_26's gravatar image

accept rate: 9%


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.

(13 Mar '17, 16:02) damsehgal5★

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

(13 Mar '17, 16:05) vijju123 ♦♦5★

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

(13 Mar '17, 16:06) swetankmodi ♦♦6★

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


answered 13 Mar '17, 18:36

akshayv3's gravatar image

accept rate: 4%

That was a nice one :P

(13 Mar '17, 18:57) naksh96194★

No wonder why there were so many submissions -_-


answered 13 Mar '17, 15:36

tihorsharma123's gravatar image

accept rate: 15%

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


answered 13 Mar '17, 19:00

vaibhavkaushik's gravatar image

accept rate: 16%

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.


answered 13 Mar '17, 19:07

saurabh9456's gravatar image

accept rate: 0%

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.


answered 13 Mar '17, 19:08

mathecodician's gravatar image

accept rate: 7%

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.


answered 13 Mar '17, 16:18

mathecodician's gravatar image

accept rate: 7%


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

(13 Mar '17, 16:19) swetankmodi ♦♦6★

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.

(13 Mar '17, 16:56) rajarshi_basu6★

answered 13 Mar '17, 16:32

saurabh9456's gravatar image

accept rate: 0%

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

(13 Mar '17, 17:51) mathecodician6★

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


answered 13 Mar '17, 17:53

bansal1232's gravatar image

accept rate: 16%

edited 13 Mar '17, 18:36

Yes, I mailed them.

(13 Mar '17, 17:59) mathecodician6★

Any type of Reply?

(13 Mar '17, 18:03) bansal12325★

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

(13 Mar '17, 18:54) mathecodician6★

CodeChef should NOT(and will NOT, as @errichto said) remove a question from a contest after it's ended.

If it would have been during the contest, they could have done it. But removing the entire problem now would be unfair for most of the people who actually spent a lot of time thinking.

(13 Mar '17, 19:12) swetankmodi ♦♦6★

swetankmodi is right. That'd be unfair to many more. It'd do more harm than good.

(13 Mar '17, 19:19) vijju123 ♦♦5★
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 13 Mar '17, 15:29

question was seen: 1,842 times

last updated: 13 Mar '17, 19:19