Git Product home page Git Product logo

test_fetcher's Introduction

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..

test_fetcher's People

Contributors

anshuman212 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.