This repository is a collection of my solutions to various competitive programming problems from platforms like Codeforces, Beecrowd, SPOJ, and others. It serves as a personal archive of my progress and learning in the world of algorithms and data structures. The highlight of this repository is a custom C++ tool designed to automate and streamline my entire workflow.
To optimize my practice sessions, I developed cp-helper, a command-line tool written in C++. It handles the repetitive tasks of setting up and organizing problems, letting me focus on what truly matters: solving.
- 🚀 Interactive Menu: A simple and fast CLI to get started on a problem or contest immediately.
- 🗂️ Automatic Scaffolding: Instantly creates a directory for a new problem with a pre-configured C++ template and an
in.txtfile for test cases. - 📅 Contest Mode: Generates a structured folder for an entire contest, creating sub-folders for each problem (e.g., A, B, C...).
- ✅ Smart Archiving: An interactive command to move completed problems from the
Working/directory to the appropriate online judge folder, keeping my workspace clean. - 🎨 Customizable Template: The C++ code template is not hardcoded. You can fully customize your boilerplate by editing the
Tools/template.cppfile, with no need to recompile!
My solutions are organized by the online judge they originate from. Problems I am actively solving reside in a local Working/ directory, which is ignored by Git.
/
├── 📁 Beecrowd/ # Completed solutions from Beecrowd
├── 📁 Codeforces/ # Completed solutions from Codeforces
├── 📁 SPOJ/ # Completed solutions from SPOJ
├── 📁 [...] # ...and other online judges
├── 📁 Working/ # [Local Folder] Incomplete solutions
└── 🛠️ Tools/ # Source code for the cp-helper
├── cp-helper.cpp # The main source code for the helper
└── template.cpp # Your customizable C++ template
The cp-helper tool is designed to be run from a local Working/ directory that you create.
-
Create Your Workspace: Set up a main folder for your competitive programming practice. Inside it, create a
Working/directory and place theTools/folder (containingcptool.cppandtemplate.cpp) alongside it. Your structure should look like this:CP_Practice/ ├── 🛠️ Tools/ └── 📁 Working/ -
Customize Your Template (Optional): Edit the
Tools/template.cppfile to match your preferred C++ boilerplate, headers, and macros. -
Compile the Tool: Navigate to the
Tools/directory and compile the script.cd Tools/ g++ cp-helper.cpp -o cp.exe -
Place the Tool: Move the newly compiled executable into your
Working/directory.# From the Tools directory mv cp.exe ../Working/
- Navigate to your workspace:
cd Working/ - Run the tool:
./cp.exe
- Follow the on-screen menu to start a new problem, create a contest, or finalize a solution.