✔
Sublime test parser
This is a test parser which can automatically parse the tests in from websites like codeforces, codechef, atcoder etc.
- See how it looks while working in this video.
✔
Why did I make sublime test parser?
- Most sublime users use a 3 column layout (source.cpp, input.txt, output.txt) file for competitive programming.
- Their was no test parser which can generate the test cases inside input.txt itself.
- I wanted one :p .
✔
Pre-requisites for running this.
- You should have node.js installed in your computer.
- If not, don't worry, just download node js from here.
- Competitive companion extension in chrome : download from here.
✔
How to run this?
- Download the project.
- Go into the file "index.js".
- On line number 10, change the "path" to the path of your "input.txt" file or any name of your input file.
- Make sure you keep the same name in line no. 28 as well i.e. if your file name is "i" , in line 28, make the first parameter of the function as path + "/i".
- Go into the project directory using the terminal.
- Run the command : " npm install " to install all the modules and dependencies of the project.
- Then run the command : " node index.js " to run the project.
- Note : Don't close the terminal. Let it run in background.
NOTE :
- You have to add 1 extra loop in sublime to run it over all sample test cases.
- For ex. you run your regular test cases like :
int t;
cin >> t;
while (t--) {...)
- Now all you have to do is add 1 extra loop :
int samples = 1;
cin >> samples;
while (samples--) {
int t;
cin >> t;
while (t--) {...)
}
- That's it.
- When you submit on any judge, just comment out the line : " cin >> samples; ".
Now just go to any problem on codeforces, atcoder, codechef etc and click on competitive companion and your inputs will be parsed!
⭐
if it helps you :) .
Please drop a Raise an issue if their is any flaw.
Thank you