4

Maybe it's just my opinion, competitive programming related questions seems to be offensive on SO to many others. By competitive programming related, I mean those online judges problems, programming competition problems, or ACM-ICPC style problems.

Every time I see this kind of problems (or when I ask one myself), the result is usually very negative, with lots of down votes and little constructive comments / answers.


What I wonder is, How should a competitive programming question be asked?

The wordings of the question, "Bad" styled codes (#define LL long long, #include<bits/stdc++.h> without explanation, etc)...I agree any OP has the responsibility to increase the wordings/ code quality to meet SO standard.

What I concern about is "show your effort" part.

  1. This kind of problems feel like college homework (with a much higher difficulty though) as they are normally not related to frameworks, design pattern, but more like a pure algorithmic task. This will attracts tons of homework? comments, with no one even look at the problem description thoroughly.

  2. These problems often are difficult to even make up an idea to solve (on the contrast, if one can make up an correct idea, usually the implementation is simple). This means if I have totally no clue on the problem, I can hardly provide codes to show my effort, no matter how much time I have spent on writing on paper to try getting an idea.


One can argue that, usually such online-judge sites will have its own community, thus there are many online resources (editorial, other's code, discussion) other than SO.

But does that mean one cannot ask such questions on SO? Also there are many online-judge problems having NO such resources, for example, many ACM-ICPC archive problems: http://www.codeforces.com/gym/100765

So if one really want to learn how to solve these problems with no support, no other online resources, how should he asked the problem on SO? Or such problem is simply a taboo on SO?

(I do not mind no one even view the questions, but when everyone down vote the question without even reading the problem statement, it is quite frustrating to me, as sometimes SO is my last hope to get help)

11
  • 7
    Due to the current culture, I think competitive programming problems are not really welcomed here, when one has no idea what algorithm should be used and has only the problem dump to offer.
    – nhahtdh
    Jul 27, 2016 at 3:15
  • @nhahtdh this is sad but thanks for telling me, so that I can just find another site when I facing these questions next time....thanks
    – shole
    Jul 27, 2016 at 3:23
  • 7
  • 1
    @dorukayhan OMG this maybe the platform I am looking for! Thanks!!
    – shole
    Jul 27, 2016 at 3:36
  • 3
    It's odd because interview questions seem to be well received, and they are very similar.
    – samgak
    Jul 27, 2016 at 3:58
  • 2
    @samgak Yes...and I know many college seniors which take part in setting interview questions for their company, are using ACM like problems with their experience. So indeed interview questions share the same source: competitive programming question. Also once I have tried to "rephrase" my question, like "I come up a question on my mind which I think it's a twist on some standard problems, but I cannot solve it blah blah blah", normally this question will get constructive answwers...
    – shole
    Jul 27, 2016 at 4:08
  • 2
    @samgak I rarely see well received interview questions too? Jul 27, 2016 at 4:57
  • @samgak care to share recent examples? Most of the old ones have been systematically deleted.
    – Braiam
    Jul 27, 2016 at 5:03
  • 2
    @Braiam Here's a recent one with 8 upvotes: stackoverflow.com/questions/38450480/… Most get around zero, but that's not much different to the average for all questions. On top of that, there are a lot of old but highly upvoted questions like this one that constantly show up prominently in related questions, giving the impression that the site approves of them: stackoverflow.com/questions/3492302/…
    – samgak
    Jul 27, 2016 at 5:10
  • 8
    The odds that this is going to be received any better at Codegolf ought to be rather low. Any kind of "help me cheat the system and win Internet points" question is going to be received poorly anywhere, that's just not a good enough reason for anybody to invest their free time. Just isolate the programming problem from the contest challenge, make it a small question that is only about the part you are stuck with. Now it is no longer a "write my program" demand and looks like any normal SO question. Jul 27, 2016 at 8:02
  • @HansPassant Thanks..finally another constructive comment. I fully agree on what you said about the cheating part, I DV those cheating questions as well (usually new account, and never reveal the problem source even I requested). What if one posted the source of question and it is not a running contest? Is it okay to ask for a high level idea for an algorithmic problem (no implementation is needed)? I asked this question because I think the nature of algorithmic problem itself is that one can hardly show the effort he tried in solving one...
    – shole
    Jul 27, 2016 at 8:25

3 Answers 3

8

It is not the responsibility of Stack Overflow to enforce the terms and conditions of external websites or competitions. In general, I judge questions based on whether or not they are viable and targeted programming questions, and ignore outside context.

If they are not good questions, I vote to close. If someone has a useful programming question and it is appropriately scoped, I judge it as such. Whether it's homework or part of a contest generally doesn't matter to me.

Not everyone has the same opinion, though, so if someone believes that you are using this question to cheat on a test, they're free to comment on this and vote how they want. All I can say is that moderators generally will not intervene because someone complains about a question being part of an ongoing competition.

The best way to avoid this is to write a clear, focused question that otherwise fits within the guidelines of the site and could stand on its own without any mention of the competition or a homework problem. This also will be of benefit to you as the asker, because often you can arrive at or come close to a solution just by identifying the specific area where you are stuck.

1
  • (I know this answer is old but) it doesn't touch a main part of the question: "What I concern about is "show your effort" part. [...] These problems often are difficult to even make up an idea to solve [...] if I have totally no clue on the problem, I can hardly provide codes to show my effort"
    – user202729
    May 11, 2019 at 8:43
6

I tend to DV/CV1 almost instantly anything here when I see "SPOJ", "CodeChef", "Project Euler", etc. mentioned in a question. Usually these questions can't be answered reasonably from the given input. Missing test cases and debug efforts.

I really puke on that unuseful stuff appearing here, as much as I think these Online Code Judge engines are just a complete waste of time for someone who seriously wants to learn a high level programming language like c, c++, java, c# or alike.


1) Most common reasons:

  • too broad
  • missing MCVE (test cases, debugging efforts)
  • asking for improvement (should go to SE Code Review)

0
2

As others have said, your best option is to turn your problem into a pure coding question. Or turn it into a math question and ask it on Math Stack Exchange.

If it's not one of those things, use the Competitive Programming topic on Quora. There are plenty of people there to answer CP questions, and it's an active topic.

I wish we had a Stack Exchange option for CP. There was an Area 51 proposal a couple of years ago, but it didn't get enough votes. Programming Puzzles & Code Golf is not an alternative, though it sounds like it should be, and people always bring it up in these discussions. That site is focused on posing and solving their own programming puzzles, not discussing programming contest problems from other sites. So Quora is your best bet.

I agree with you about the antipathy towards competitive programming on SO. Whenever the topic comes up, I see comments similar to those above -- CP questions are about trying to "cheat the system" or "I really puke on that unuseful stuff." I don't know why CP provokes such strong reactions here, but I wrote up a few ideas in a blog post, Stack Overflow vs. Competitive Programming Questions.

1
  • 1
    I will upvote 10 times if I could...Thanks!
    – shole
    Jul 28, 2016 at 6:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .