Git Product home page Git Product logo

codeforces-test-case-parser's Introduction

Codeforces Test Case Parser

This is two scripts that fit together. getTestCases.py accesses the Codeforces website, fetches the sample tests for each problem of the given contest, and for each problem puts them formatted into two seperate text files for input and correct output. run.py runs your executable on all the test cases, and if prompted to, checks if they fit the correct answers.

Usage

To get the test cases you need to first find the contest number (not the round number), which is found in the url of the contest amongst other places, if the number is for example 754 you run:

./getTestCases.py 754

and all the test cases will be downloaded to your current directory in the format "Problem Letter".txt and "Problem Letter".out.

To run your tests you should have your executable named "Lowercase Problem Letter".exe like for example a.exe, b.exe etc. run.py is run with two arguments: The problem letter and whether you want to check your output run like this:

./run.py a

for not checking answers, and:

./run.py a 1

for checking answers.

In case you want to add more custom testcases to your tests during a contest with for example edge cases, change the number of test cases (the first number in the .txt file) and add your test case below with the correct parse break at the end (the exact string used for parse breaks can be changed easily in a constant at the top of each of the two scripts).

codeforces-test-case-parser's People

Contributors

emilgoldsmith 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.