Preparing a USACO submission meant setting up identification, the problem name, library imports and the input and output files expected by the platform. This generator automates that preparation, leaving space for the solution itself.
What it produces#
The C++ implementation takes a participant identifier and problem key, displays the configuration and asks for confirmation. It then writes a .cpp file with ID, PROG and LANG headers, common libraries and a main function.
The template opens input and output files named after the problem key: problem.in and problem.out. It also leaves places for function declarations and implementations. The repository contains a Python variant alongside the C++ generator.
A small tool for writing other programs#
It does not generate the algorithm that solves the problem. Its job is to turn terminal arguments into a consistent source file: parameters, filenames, formatting and output streams.
I made it in 2014, when competitive programming was an important part of my learning. It preserves a habit that still appears in my tools: when the same preparation repeats, turn it into a small program and leave more attention for what follows.