Configuring Laptop for CodeForces and TopCoder
By Asim Krishna Prasad
Posted on 10/12/15
Tag :
Tweaks
I have seen people asking this question a lot on public platforms. In this post I am going to write about my customizations. Though these customizations play a very small role in competitive programming, only skill and speed matter, I am still gonna go ahead and write this post.
This post focuses on Sublime integration with C++ as primary language.
CodeForces
Codeforces has certainly took the title of "The Social Network" for competitive programmers. The platform has been generous enough to provide well documented APIs which makes it really easy to build something for the community.
I have built Buggy plugin for Sublime (for Linux and Windows) to be used in a CodeForces round. The plugin can be very easily integrated with sublime and does a decent job in a contest.
The same plugin can be used for compiling almost any code, it really doesn't matter if the code is for CodeForces or not.
TopCoder
Since TopCoder runs Arena on the local system, it's almost too easy to tweak with it.
First of all, I use KawigiEdit to get a generated code for the class and method. This really saves time. It's very easy to integrate it with Sublime after that.
Follow these steps to integrate Sublime with your TopCoder Arena :
- Open the Arena. Goto Options -> Editor
- Select Kaiwigi and click Configure
- In the General/Testing tab, change the General path to your home directory. Note that this directory is going to be a reference point to all the paths we are going to add in following steps.
- For me the General path looks like : /home/asim
- GoTo Languages.
- In C++ section, change File Name, Compile Command and Run Command as per requirements. For me, for SRM 675, settings look like this.
- File Name : /Pakhandi/Lib/TopCoder/675_1/$PROBLEM$.cpp
- Compile Command : g++ Pakhandi/Lib/TopCoder/675_1/$PROBLEM$.cpp -o Pakhandi/Lib/TopCoder/675_1/$PROBLEM$
- Run Command : ./Pakhandi/Lib/TopCoder/675_1/$PROBLEM$
- Save the configurations.
- Open the folder, in my case 675_1, in Sublime (subl 675_1).
- Open the SRM in Arena, and Save the generated code.
- You should be able to see the file in your Sublime now.
- After coding the solution, go back to Arena and Load the code.
- You can now run the test cases or debug in the Arena if you want. Just remember to Save and Load when you switch between Arena and Sublime.
Hope it helps :)
COMMENTS :