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
// cpp code here ...

int main() {

}
```

Output:

// 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.
    • If it’s a problem with publicly available test data (ex. USACO), we expect that you’ve checked the test case(s) on which your code is failing.
    • We expect that you’ve tried stress testing to generate a small test case on which your solution fails (as described in the module).

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.
    • We expect that you already tried stress testing, as mentioned above. Include the generator code.
  4. Which test cases you’re failing on (for USACO, a screenshot suffices).

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:

14 Likes
Switching on the Lights
USACO Bronze 2016 Problem 1 Square Pasture help
File or terminal?
2013 November Silver
Welcome to the USACO Forum!
Question on Breed Counting (2015 December Silver)
USACO Bronze, Ski Design
Closing the Farm 2016 US Open Silver
Bronze 2019 US Open Milk Factory - Fails 9th test case
Connecting Two Barns
USACO Bronze January 2020 Problem 1
Wa in 1 Tc in Usaco Silver 2013 US Open Gravity
Angry Birds Gold
Why did the cow cross the road?
USACO Silver: Triangle
Bovine Genomics Help
Https://cses.fi/problemset/task/1068
AtCoder - Multiples of 2019
CSES Range Update Queries
Why does the USACO website keep telling me my answer on the sample input case is wrong?
Shortest Paths with Non-Negative Edge Weights : Why did the cow cross the road?
Intro to Sets and Maps (USACO Guide Bronze)
I am confused with Multiset/Set Upper_bound. Need help
What should I do before asking for help?
Distinct element in range using segment tree getting tle PLS HELP
Need help with the easiest problem on usaco
Working on a DP problem
Code Only Works for A Few Cases
LCA implementation
Fence Painting Solution
USACO December 2022, Silver Problem 1
CSES Missing Number
CF- Good Subarrays Question
Pls help me
USACO 2017 January Contest, Bronze Problem 3. Cow Tipping
I can't get a perfect score on Diamond Collector
Http://usaco.org/index.php?page=viewproblem2&cpid=996
Help with USACO 2015 Speeding Ticket
Help debugging AtCoder: Multiple of 2019
USACO 2019 December Contest, Cow Gymnastics
(Help, Silver) Closest Cow Wins
USACO 2016 February Contest, Bronze Problem 3. Load Balancing
Snowboots 2018 Gold C++ Debugging
Wrong Answer for 3 testcases on The Bovine Shuffle - USACO Silver December 2017 Contest
USACO Gold 19 - Shortcut
Help in "milk measurement"
Please help debug!
Gold - shortcut
Help on Gold problem
Silver Following Directions
BFS Help
Solution - Birthday Party (VT HSPC 2014)
USACO 2016 January Contest, Bronze Problem 3. Mowing the Field
USACO 2020 January Contest, Bronze Problem 3. Race
Help on a train.usaco.org problem: Milking Cows in C++
Passed half of the test cases, need debug help
USACO 2020 December Contest Bronze, Daisy Chains
USACO Silver: Triangle overflow?
Don't see why wrong
Dfs not working!
USACO 2016 February Contest, Bronze Problem 2. Circular Barn
Fenced In
The Cow Run
Help with "Candy Cane Feast" 2023 Dec. Bronze
2024 US Open Silver Problem 1 Bessie's Interview: What's wrong with my code?
Https://usaco.org/index.php?page=viewproblem2&cpid=712
Milk Measurement (Silver) Debugging
USACO 2019 December Contest, Bronze Problem 1.Cow Gymnastics
Sample Test Case passes in Visual Studio Code but doesn't in Analysis Mode
Load balancing problem bronze wrong answer
APIO 2011 How to solve Table Coloring Problem using DFS (Two - Coloring)?
Milk Factory BFS
Contaminated Milk (2015 December Bronze) Testcase 9 Failing
USACO 2019 February Contest, Bronze Problem 3. Measuring Traffic
High Card Low Card Help (Greedy Algorithms with Sorting) [2015 USACO December Gold 1]
Help with "Convoluted Intervals " 2021 Dec. Silver
How to solve CSES Two Sets Problem?
Help on Moocast
2016 December Contest, Silver P3, Moocast
Clarification on Debugging Guidelines
Shortening Solutions for USACO
2016 US Open Problem 3, Closing The Farm
Link Cut Tree: Squirrel Cities?
Springboards USACO Gold 2020 January Contest
Hoof Paper Scissors Problem USACO help needed
USACO Pasture Walking
How does usaco input work.(competition)
Terminal Doesn't Agree With Test Server
#cp problem
CSES Fixed-Length Paths I TLE
2016 US Open Bronze Bronze Problem 1. Diamond Collector
Help needed for Comfortable cows problem USACO silver Flood fill
Need help with solving a problem
Blocked Billboard 2
[Java]: Square Pasture (1st Problem) Debugging Help
Painting the Barn (USACO GOLD)
Can't find why the code is going into infinite loop
Help on how to debug this problem
How could this code output 2 different things? Problem: USACO 2016 December Contest, Silver, Problem 2
Code works locally but not on the USACO wensite
Https://cses.fi/problemset/task/1084/
Having Trouble figuring out what went wrong in my mixing milk code
A question on Sololearn ( c++)
SPOJ.com - Problem NGIRL
Switching on the Lights works until 6th case
Basketball one on one problem
Help in writing a pseudocode for a problem
Help please!
Stuck on Test Case 4
Problem with code
USACO 2017 January Contest, Bronze Problem 3. Cow Tipping
CANNOT Find Error in USACO Silver Connecting Two Barns
System.out.println() producing empty stdout in java
Milk Mixing
USACO 2021 February Contest, Bronze Problem 2. Comfortable Cows (Need help debugging)
(Help, Silver) Closest Cow Wins
Dec. 2022 Silver Problem 1 - Barn tree
Dec. 2022 Silver Problem 1 - Barn tree code help
Please help debug!
USACO 2017 DecembeR Contest, Gold Problem 3, Haybale Feast
Debugging Help CodeForces Problem
CSES - Even Outdegree Edges
Help with 2015 Gold Q1 (High Card Low Card)
Fenced In
USACO Dec 2023 Silver Target Practice
Help in "milk measurement"
Help on a centroid decomposition problem
Should I Use Matrices for Cow Tipping (Bronze)?
Bessie's Interview