Skip to content

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

Notifications You must be signed in to change notification settings

Anshuman212/Test_Fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Darth Test Parser

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

Updates:-

  1. Now with the help of " diff " command track if your output is same as the ouput required by the online Judge

Motivation:-

  1. The only motivation was the existence of competitive companion that could help with getting the tests of a Problem rather than Copy Pasting.

Necessary Installations for running this parser.

  • You should have node.js installed on your local system.
  • If not,just download NodeJS from here.
  • Competitive companion extension in Browser : download from here.

Initial Steps:-

  1. Either Fork & Clone this Project or download the codes in your system.( Don't know either refer these Cloning Repo || Downloading Repo
  2. Go into the file "index.js".
  3. Press CTRL+F and find and change the "path"(can check Line 9 in code) to the path of your "input.txt" file or any name of your input file.
  4. Make sure to 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.(use cd commands)
  6. Type : " npm install " and Press Enter to install all the modules and dependencies of the project.
  7. Then Run the command : " node index.js " to run the project.
  8. IMPORTANT : Do not close the terminal. Let it run in background. Otherwise Process Ends.

Let's fire the parser:-

  • Let's say you have a structure of main something like this. image
  • You have a main fuction from where you call a function that does the rest of work.
  • Now you need to app an extra while loop to run it over all the Test Cases.
  • Refer the image above
 cin >> samples;
  while (samples--) {
  int t;
  cin >> t;
  while (t--) {.function call or any code excecution..)
}

It's done you can now continue to think the Logic of the Problem. On Submitting your code to Online-Judge comment out the

cin>>samples;

and you are good to go.

DARTH SIGN OFF..

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published