20

Sometimes, we stuck on solving competitive programming problems in several online platform like UVa, Codeforces, TopCoder etc. I want to know, where to ask those problems? I thought http://programmers.stackexchange.com/ is the right place to ask them. But when somebody asked a problem (related to competitive) there and I answered that, the community started down-voting me and asked for proper documentation and not to use #define or typedef etc for C++. They also told that it is not the right place to ask such type of problems. But to solve competitive problems in C/C++, #define,typedef, including <bits/stdc++.h> are common.

So now, I want to know clearly about the right place to ask such type of problems.

12
  • 3
    Code golf maybe?
    – 9Deuce
    Commented Jun 30, 2015 at 12:42
  • It can be, but I did not see any similar post there till now. Commented Jun 30, 2015 at 12:45
  • 4
    You can ask them on SO, but phrase it as an algorithm question and show your attempt (analysis of the problem, and analysis of your approach). There is also a proposal for a site dealing with competitive programming on Area 51, but it's going to take a while (it may not even get to see the light of day).
    – nhahtdh
    Commented Jun 30, 2015 at 12:51
  • As for the answer, the users of the site frowns upon bad coding style, since the site is also used by learner of new languages, so the coding "style" used in competitive programming (which are usually non-compliant, compiler-dependent and non-maintainable code) is not welcomed.
    – nhahtdh
    Commented Jun 30, 2015 at 12:56
  • 10
    Cheating on coding competitions is on topic at SO. Just don't assume that you'll find many programmers that think this is fair play or a worthy use of their free time or a practical problem that needs to be solved for the benefit of humankind. Commented Jun 30, 2015 at 13:05
  • 3
    I am talking about offline practice. Any running contest can not be discussed. But there should be a platform where competitive programmers can show their approach, code and where they are stuck. They should also give some documents which prove that it is not a part of any running contest. If someone proved to be cheated, he could be banned immediately. Most of the online judge problem has done by any other before. So, there should not be free programmer who would solve for the benefit of humankind. @HansPassant Commented Jun 30, 2015 at 13:33
  • 2
    "Should"? Some programmers have an odd sense of entitlement, it is not the American way. You can for example setup a mailing list with programmers that are interested in these exercises as well. Or create an Area51 proposal, that's tougher. Commented Jun 30, 2015 at 13:55
  • 1
    @HansPassant it may not be the American way, but it also not the way of programmers in general, just adding to that. Commented Jun 30, 2015 at 14:04
  • 2
    There was a proposal for a site in SE network for competitive programming, but it was closed as it fails to gain enough traction in one year: area51.stackexchange.com/proposals/70520/…
    – nhahtdh
    Commented Jul 1, 2015 at 3:12
  • "But there should be a platform where competitive programmers can show their approach". Highly agreed. When will you have it ready?
    – Gimby
    Commented Jul 1, 2015 at 13:48
  • 1
    @Gimby He's just expressing what he thinks would be useful features of this hypothetical competitive programming Q&A site. Nothing wrong with that. Commented Jul 1, 2015 at 16:02
  • 1
    Help us create a new SE site for algorithmic competitive programming: area51.stackexchange.com/proposals/104641/…
    – mrk
    Commented Jan 9, 2017 at 14:53

2 Answers 2

17

The fact that a question relates to a programming competition does not make it on/off-topic here.

What does make it on or off topic is the actual question content.

On-topic

I'm trying to implement X algorithim, but the array in the below code is getting corrupted. The 4th and 5th element match at the end, overwriting the unique data that was there to start with. < Insert code and sample data here >

Off-topic

I'm practicing for X programming competition and need to know how to solve Y problem

Note that the second example is still off-topic if you don't mention the competition, and the first is still on topic if you do. Again, the context of a programming contest is largely irrelevant.

In conclusion, ask in the appropriate spot regardless of the non-programming context. Many times that will be here on SO. Do note that if it's a known programming contest question, you could still get downvotes for trying to get help in an active competition.

2
  • Is there any StackExchange site where the 2nd case be considered on-topic and people will find it interesting to solve the problem?
    – asn
    Commented Feb 12, 2019 at 16:36
  • 2
    @jay The closest would be codegolf.stackexchange.com (they also take "programming puzzles"), but I'm not an active user there so be sure to read their on-topic page very carefully before posting. Commented Feb 12, 2019 at 16:58
7

The Competitive Programming topic on Quora is very active. If you have a question about a matter of opinion, or if you're just encountering a lot of resistance to a CP question that you ask on a Stack Exchange site, then that's the place to ask it. The community there is less hardcore about rules. This has pros and cons, but it does mean that your question has to be really egregious before it will get closed.

If your question is strictly about code, I would encourage you to try to express it in a way that meets Stack Overflow standards, and ask it there. It can be frustrating, but you'll get high-quality answers.

Some people on SO perceive competitive programming in a negative way -- it's a waste of time, it doesn't benefit humanity, etc. Regardless of whether that's fair or not, the more you can make your question about a programming problem rather than a competitive programming problem, the more help you're likely to get. However, if your question really does involve a specific #define or typedef, or something in <bits/stdc++.h>, go ahead and mention that.

1
  • 8
    CP is one kind of programming and professional programming is another kind. Stack Overflow's community consists of 99% professional programmers, but that doesn't give them the right to raise their style to an absolute value. CP has completely different goals and criteria, therefore the best practices are also completely different. Telling a CP guy not to "prematurely optimize" is just uninformed advice. This is why I feel a dedicated sub-community should be allowed to form around a competitive-programming tag. Professionals who feel CP is below them can simply put it on the Ignored Tags. Commented Nov 13, 2016 at 8:04

You must log in to answer this question.

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