Skip to content

prakharrai1609/Competitive-coding-test-parser-for-sublime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✔ 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?

  1. Most sublime users use a 3 column layout (source.cpp, input.txt, output.txt) file for competitive programming.

image


  1. Their was no test parser which can generate the test cases inside input.txt itself.
  2. 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?

  1. Download the project.
  2. Go into the file "index.js".
  3. On line number 10, change the "path" to the path of your "input.txt" file or any name of your input file.
  4. 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".
  5. Go into the project directory using the terminal.
  6. Run the command : " npm install " to install all the modules and dependencies of the project.
  7. Then run the command : " node index.js " to run the project.
  8. 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! 😃

Please drop a ⭐ if it helps you :) .


Raise an issue if their is any flaw.
Thank you

About

This is a test parser which can automatically parse the tests in from websites like codeforces, codechef, atcoder etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published