- Install sublime Input plugin from here : https://github.com/mavidser/SublimeInput
- Restart sublime input and now open KeyBindings-user file using : Preferences -> KeyBindings-User
- Copy content of SublKeyMap file(Present at Tools/SublEss directory) into it.
- Now open Sublime Input Settings-User file using : Preferences -> Package Settings -> SublimeInput -> Settings-User
- Copy content of SublInp file(Present at Tools/SublEss directory) into it.
- Now install gettc(TopCoder tool for offline practice) from here : https://github.com/seri/gettc
- Now copy runner.rb and runner.sh (files present at Tools/gettcEss directory) into : "/var/lib/gems/1.9.1/gems/gettc-1.10/dist/template/bin/" directory
- Change permissions of runner.sh, runner.rb files by running the following script (present at : Tools/ directory): bash Permissions.sh
- Now reset the gettc by gettc reset
-
Now copy "create" file(Present at Tools/templates/ directory) into "/bin/" directory and change permissions so that you have right to execute. That is :
sudo chmod 755 /bin/create
- Now copy "templates/" directory to your home folder. And make sure that you are the owner of this directory.
- Install BeautifulSoup module(Python module for parsing HTML) using sudo apt-get install python-BeautifulSoup
-
To work, you need to have directory structure like this (In your home directory) : ~/ |-- Programming | |-- CodeChef | |-- CodeForces | |-- Spoj | `-- TopCoder
That is : => If you need to do CodeChef Problem you need to work in : "~/Programming/CodeChef/" directory and file name should be : < ContestCode >_< ProblemCode >.cpp Example : MAY15_CHEFRP.cpp, COOK56_DIVGOLD.cpp, .....
----------------------- => If you need to do CodeForces Problem you need to work in : "~/Programming/CodeForces/" directory and file name should be : < ContestCode >_< ProblemCode >.cpp Example : 546_B.cpp, 71_C, 538_B.cpp, ..... ----------------------- => If you need to do TopCoder Problem you need to work in : "~/Programming/TopCoder/" directory
- To create a new problem or to continue with the old one, type : create "ProblemName" in terminal. That is : => To do CodeChef problem, type : create < ContestCode >_< ProblemCode >.cpp
-
Example : create MAY15_CHEFRP.cpp, create COOK56_DIVGOLD.cpp, ..... ----------------------- => To do CodeForces problem, type : create < ContestCode >_< ProblemCode >.cpp Example : create 71_C.cpp, create 546_B.cpp, ..... ----------------------- => To do TopCoder problem, type : create ProblemCode (You can find problem code in problem link), for example I want to do PermutationDiv2 problem and it's link is : http://community.topcoder.com/stat?c=problem_statement&pm=13679 So in this ProblemCode is 13679) example : create 13679, create 13035, .....
- To Compile and run, just press "CTRL + z" in the sublime text. The code then compiles(The Compilation errors will be show if any) and runs. The output will be shown and corresponding verdict(TLE, ACC, WA, RTE) will be displayed. That's it.
NOTE :
Demo : https://youtu.be/O1kWh8BIVLA?t=315
- If you have your own template for cpp, then put that in ~/templates/template.cpp file.
- This works only for cpp. This is one limitation.
- Report bugs at : achaitanyasai[AT]gmail[DOT]com