Giter Site home page Giter Site logo

usaco_cpp's Introduction

Install software

  1. VS Code
  2. GIT (Install GIT optional unix tools if you use Windows without WSL.)
  3. Mingw-Builds (Extract all and add ..mingw/bin to PATH.)
  4. Python (for running automated tests)
  5. (optional) Tkdiff

Prepare your local repo

git clone https://github.com/suwc/usaco_cpp
cd usaco_cp

Create a directory for a new problem

cp -R template newProblem

Run automated tests

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:

  1. Passed: the actual output matches with the expected output.
  2. Failed: the actual output does not match with the expected output.
  3. Completed: the expected output file does not exist.
cd newProblem
python test.py

We expect to see something like:

.\00.in Passed

Debug in VS Code

  1. 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".)

  2. 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 )

  3. 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"],

usaco_cpp's People

Contributors

suwc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.