- VS Code
- GIT (Install GIT optional unix tools if you use Windows without WSL.)
- Mingw-Builds (Extract all and add ..mingw/bin to PATH.)
- Python (for running automated tests)
- (optional) Tkdiff
git clone https://github.com/suwc/usaco_cpp
cd usaco_cp
cp -R template newProblem
All files ending with '.in' are treated as test input files. The output of each test is stored in '.out.actual' and compared with '.out' with three possible outcomes:
- Passed: the actual output matches with the expected output.
- Failed: the actual output does not match with the expected output.
- Completed: the expected output file does not exist.
cd newProblem
python test.py
We expect to see something like:
.\00.in Passed
-
Open
problem/main.cpp
in VS Code. (Note: the first time you do this, VS Code will prompt you to install "C/C++" and "C/C++ Extension Pack".) -
Press F5 to debug; press Ctrl-F5 to run the code without attaching the debugger. (Note: if PowerShell in VS Code complains about '<', switch to cmd.exe )
-
To debug a different test than "00.in" or to use the terminal for input during debug, update or comment out the following line in
.vscode\launch.json
:"args": ["<", "00.in"],