Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

kartikPant23's blog

By kartikPant23, history, 5 years ago, In English

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.

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it