This script automatically extracts the sample test cases of a given codeforces contest, creates sparate files for inputs and outputs and organizes them in saperate folder of each problem.
You can also provide your own template file and the script will create a solution file based on the template file for each question in the contest.
This script works on both windows and linux
All sample test cases can be automatically checked using runtests.py
Make sure python3 is installed on your machine.
git clone https://github.com/yadav-aman/codeforces-helper.git
cd codeforces-helper-
pip3 install -r requirements.txt -
pip install -r requirements.txt
-
python3 app.py <contest ID or contest URL>
Make an executable in linux
chmod +x app.py
After making the script executable we can directy run the script as
./app.py <contest ID or contest URL>
-
python app.py <contest ID or contest URL> -
python app.py 1234python3 app.py https://codeforces.com/contest/1234./app.py 1234
- Competiton directory generated by app.py contains runtests.py file that is used to automatically compare expected output with your output.
If i want to check the solution of Problem D then i can run the following commandORcd 1234 ./runtests.py dpython3 runtest.py 1234/d