Copying code for standard part of problem from web

I just saw this statement on codechef (at bottom on cook-off page)

If anyone is using code from some other source in his submission, he should provide proper attribution. Failing this, it may be considered plagiarism and the submission will be subject to disqualification.

So… Is it allowed to copy code from online sources for some standard part of problem?? Like say if I am using Balanced BST then can we copy paste code from geeksforgeeks or from somewhere else and provide reference for same?

And if yes then question would be, should it be like this? I mean is it allowed in ACM-ICPC on-site rounds? I never participated in one so not sure but I think it’s not allowed. In that case it should not be allowed here too… no??


Long contest are meant for learning, so firstly they want you to learn. They have said that copy-pasting without learning isnt allowed, but we cannot check that sadly…

I might add, the problem setters are specifically instructed that "your problem should not be easily ‘googleable’ ", meaning the concepts should require some twist. Except some really basic things like finding modular inverse, you will find things require an effort to google and find.

If you are “just” copy pasting, its allowed but not morally good. You will suffer at places where its not allowed (placement coding contest, interviews etc.). The chief motto should be to learn that stuff. Ultimately you yourself are responsible for how good coder you become in the given span of time. Skills will help you in long run, that i can assure you :slight_smile:

The link is asked because, if plagiarism checker catches you, they can get a reason why. Its possible that many people copy the code from that source, or write it very similar to it (esp if they are also learning from that source). With link given, atleast its assured that you are honest and they will get a good reason that why you got caught. Its more for convenience while checking plagiarism.

1 Like