This application is to assist a competitive-programmer in a CodeForces round. This application downloads all the sample test cases for a problem and runs a user's solution program on all these test cases so that no time is wasted on manual checking of the solution.
For now the application is for C++ users only.
UPDATE : Linux and src_linux contain the under-development files for Linux support.
The project is under constant development and the files in the repository might be unstable. It is therefore advised to download the latest release for usage. This is the link to the latest release
- Windows OS
- Internet Connection (it should be working on cmd and should be allowed for all the applications)
- A little space in C: drive
- Sublime Text-3 (make sure it's included in the PATH-variables)
- To check Sublime Text-3 is included to PATH-variables
- Open a cmd window.
- Run "subl" in the cmd.
- If Sublime opens up, everything is perfect
- To check Sublime Text-3 is included to PATH-variables
- A default browser
- Working g++
- To check g++ is working
- Open a cmd window.
- Run "g++" in the cmd.
- If it throws an error of missing file, everything is perfect
- To check g++ is working
- Download all the files from here : V.1.0.
- Shift the CF folder to "C:\". This is very important for the application to work. The CF folder should be directly in C: drive
- Open Sublime-Text-3 (referred as Sublime here after), and change your build system
- GoTo "Tools -> Build System -> New Build System".
- A file with some pre-written code will open, delete all the contents of this file.
- In the src folder you'll find a file CF.sublime-build. Copy the contents of this file in the file that had opened up in the previous step.
- Save this file in the default location with name CF
- GoTo "Tools -> Build System" and select CF
- Your Sublime is now configured
- Change the template code in template.cpp as it suits you.
- The application is made using Python-2.7.9 and Shell scripting
- BeautifulSoup module is used alongwith requests in Python
It'll then download everything and open Sublime and the problemset in our default browser.
Code your solution and press Ctrl+B to compile the code.
Use Ctrl+Shift+B to run the program on the test files.
NOTE: It's better to have a shortcut of the start.bat file on Desktop or somewhere more accessible.
- It is the batch file which drives the entire application. It first takes the round number as the input and passes it to the ini.exe. After ini.exe has completed it's task, start.bat opens the contest-folder in Sublime, and opens the template for the first problem, after that it opens the Problems-Webpage in the default browser and ends.
- ini.exe is the executable format of the python script ini.py. The python script ini.py uses requests and BeautifulSoup to fetch the data from the CodeForces site. The driver batch file, start.bat, passes the round number to the python script so that the script fetches the problems of the required round. ini.exe also makes the folders, according to the question numbers, and puts the test-cases as well as the template code into them. Another bat file, f.bat is also transferred to all the folders.
- This batch file holds the responsibility to run the .exe file generated by the program of the user on all the test-files and show the output generated by the user's program and the correct output, in a cmd-window.
- This file is to allow user to set a template code for his solutions. This code will be transferred to each problem-folder as prog.cpp
- This is the sublime-build file. This is a custom build which compiles cpp code and makes an exe file on Ctrl+B, and runs the f.bat file on Ctrl+Shift+B.
Refer to this post for more detailed explanation of the working of the application.
For Hugs and Bugs drop a mail at asimkprasad@gmail.com