Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

coderick14's blog

By coderick14, history, 3 years ago, ,

Hello everyone. I've been attending contests for a while now. In order to test my code against sample cases, I came up with a command line tool. It runs your code against the sample cases and shows the result (expected output versus user output) and verdict(AC, WA, TLE, RTE). All this without leaving the terminal. I would really appreciate if you try it out and give some feedback so that I can make it better.

You can prefetch your cases so that you can test them later offline. Or just test your code on the fly.

Install with pip install --user ACedIt

Examples
• acedit -s codeforces -c 86 -p D -f (prefetch cases from problem 86-D)
• acedit --set-default-site codeforces (so that you dont need to mention the site everytime)
• acedit --run solve.cpp -c 835 -p D (run your code against the cases of 835-D)
• acedit --run test.py -s codechef -c AUG17 -p CHEFFA (similar as above, but with Codechef)

Thanks a lot for your time!!

• +78

 » 3 years ago, # |   0 Auto comment: topic has been updated by coderick14 (previous revision, new revision, compare).
 » 3 years ago, # |   0 Just downloaded it looks great! Thanks!Can you post some instructions on how to check the test cases for the practice questions on codechef or hackerrank?
 » 3 years ago, # |   0 I use cygwin with Windows and I get this error: File "c:\cygwin64\tmp\pip-build-b7cb_s7g\acedit\acedit\install_entry.py", line 13, in run from main import supported_sites ImportError: No module named 'main'Any idea how to fix it? :/
•  » » 22 months ago, # ^ |   +16 You get that error when using Python 3.x, I fixed it using Python 2.7 instead. It's very likely you'll encounter more errors on Windows because the tool was written for Linux. The file "util.py" makes some calls to the OS with Linux syntax, just change them to Windows syntax, lines 314,315,316,330 to be precise. Also modify the g++ flags (same file) if necessary. Cheers!
•  » » 12 months ago, # ^ |   0 I've just added support for python3. If you pip install now, it should work. Added support for atcoder as well, but it's experimental.
 » 12 months ago, # |   0 How this will work with problem have multiple solutions ?!
•  » » 12 months ago, # ^ |   0 Lol. Write your own checker then.
•  » » » 12 months ago, # ^ | ← Rev. 2 →   0 If i want to write my checker so no need to solve the problem:)
•  » » 12 months ago, # ^ |   0 Sorry that it won't work for such problems. It becomes considerably harder to implement this.
 » 12 months ago, # |   0 cf tools does the same thing. It's easy to use. Just copy the code to the test case dir and run cf test.
 » 12 months ago, # |   0 Really great but Hightail works for me.