How to ask for help on a problem

Here are some general guidelines for how to effectively ask for help on the Forum:

Basic Requirements

  1. Include a link to the problem. For problems that that can be found within the guide, just include the internal Guide URL (ex. Circular Barn).
  2. Format your post appropriately (especially language-specific code blocks such as the following).
// cpp code here ...

int main() {


If you don’t understand the problem solution conceptually:

These are great questions to ask in the Forum! Make sure to let us know what part of the solution doesn’t make sense to you instead of simply saying “I need help on this problem.” If you really don’t understand any part of the solution, that’s fine – you should specify this in your question.

If you’re wondering whether an approach will work, we expect that you’ve already attempted to implement it before asking on the forum.

If you need help debugging your code:

The Forum isn’t a free debugging service!

  • We expect that you’ve tried your best before asking for help (though don’t be afraid to ask; the worst that can happen is we’ll let you know that you should try some more yourself first).
  • We expect that you have read through the entire Debugging module before posting.

What to include:

  1. Link (as mentioned above)
  2. All of your code so others can run it.
    • formatted (as described above) and preferably commented
    • If there’s a section you think is wrong, mention it.
  3. What you’ve tried so far.
  4. Which test cases you’re failing on (for USACO, a screenshot suffices).
    • Read the final section of the Debugging module.
    • We expect that you have already tried generating small counter-tests (as described in the module) but you haven’t found one that your program fails on. Include the generator code.
    • If you have found a small test case on which your program fails on (and you know why the expected output is correct), you should be able to figure out why your program is incorrect on your own.

If you can’t figure out why your program is producing a particular output:

  1. Add print statements to your code and compare their outputs to what you get when you simulate your program by hand.
  2. Check for undefined behavior.

If we do not think you have read all of the above, we will refer you back to this post.

Closing Thoughts

Please don’t be afraid to ask for help on this Forum! We’re a friendly community and the worst that can happen is we’ll ask you to revise your question :slight_smile: