This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
What I Built
CP Hint Coach is a small app for people practicing competitive programming. You paste a problem and whatever you've tried so far, and it gives you four hints that get more revealing one at a time: a nudge, a key observation, the approach in plain English, and finally a code skeleton with the main logic left blank. The goal is to get you unstuck without handing you the solution.
I built it for students and self-learners preparing for contests or coding interviews. When they get stuck on a Codeforces or LeetCode problem they usually either stay stuck or open the editorial, and the editorial skips the part that actually teaches them, which is working out the idea yourself. Coaches could also hand it to their students as something that helps without giving answers away. Whether anyone would pay for it is something I haven't been able to find out yet.
There's also an optional Codeforces lookup. Type a handle and it lists problems you recently got a non-accepted verdict on.
Demo
The model runs on the user's own machine, so there's no hosted version to link to. Here's a short screen recording of it working:
Code
CP Hint Coach
A hint coach for competitive programming that runs on your own computer. You paste a problem and whatever you have tried so far, and it gives you four hints that get more revealing one step at a time. The idea is to get you unstuck without handing you the solution.
It uses an open-weight model through Ollama, so hint generation does not need a cloud API or an account.
Built for the Hacktoberfest Week 2 Dev challenge (theme: Side Hustle).
The problem
When you are stuck on a Codeforces, LeetCode or CodeChef problem, there are usually only two options. You stay stuck for an hour, or you open the editorial (or paste the problem into a chatbot) and see the whole solution. The first costs you momentum and the second costs you the practice, because the part where you work out the idea is the part that…
How I Built It
It's about 450 lines of Python. The interface is Streamlit, the model runs through Ollama, and the model I used is qwen2.5-coder:3b, an open-weight code model. The Codeforces lookup uses their public API.
When you press the button, the app sends the problem, your attempt and your chosen language to the model in a single request. The prompt asks for four hints as JSON. The app parses the reply, with a fallback for when the JSON is slightly broken, and keeps all four hidden. You reveal them one at a time, so each new level only appears after you press the button for it. The coach's behavior lives in one prompt file, and the model name is one line in coach.py.
Why Does Open Innovation Matter?
A practice session isn't one question. You ask, unlock a hint, try something, get stuck again, unlock another. With a local model none of those requests has a per-request fee, which is what makes a tool like this realistic to give away, or to charge a small amount for, without a bill that grows with every hint.
It also keeps your work private. Your attempts and code never leave your machine, and after the model is downloaded, hint generation works with no internet. The one exception is the Codeforces lookup, which is optional, needs a connection, and only sends the handle you type.
The third thing is control. Because I run the model myself, I can change how much each level reveals, or swap in a different model and compare the results, by editing one file. A closed API would let me change the prompt but not the model underneath it.
Open doesn't mean the same thing for every model, though. Ollama lists the 3B model I used under the Qwen Research License, not a fully permissive one, so if I were really selling this I'd have to read those terms carefully or choose a model with a clearer license. I also didn't compare against a closed model, and a larger one would probably do better on hard problems. What the open model gave me was a tool that costs nothing per request, keeps data local, and lets me change anything.
Top comments (0)