Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

Sample Cases Runner Script

Правка en1, от kartikPant23, 2021-12-24 14:04:00

Yesterday I was watching neal's YouTube video, where I saw him using a script runsamples a A. This script ran his program against the sample test cases and provided the output status. So I thought of creating something similar for the community and myself.

How it works??

  1. You need to create a directory with a name similar to Contest ID, say 821.
  2. Compile your CPP files, and say the output file created is a.out.
  3. Using this script I created, you can type the command cf_run a.out A, and it will run your output file against sample test cases from 821A - Okabe and Future Gadget Laboratory and display the status of output with a few more necessary details.

So no more efforts to copy-paste the sample test cases each time.

How it looks??

Script Output - Accepted Solution
Script Output - Wrong Solution

Where to find it??

You can find the script, here on github. It has a more detailed explanation of how to get things working. If it helps feel free to give it a star. PS — I am a newbie at shell scripting, this is actually the first script I wrote, so was not able to catch all errors/exceptions. Therefore, those who are experienced can make contributions.

Теги shell-scripts, cp-scripts

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский kartikPant23 2021-12-24 14:04:00 1596 First blog on codeforces regarding cf_run script (published)