Skip to content

nxtsourav7/Competitive-Programming-Setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Competitive Programming Setup

Welcome to the Competitive Programming Setup repository! This guide will help you set up your environment for competitive programming using Visual Studio Code (VS Code) and Geany. These editors are powerful tools that can enhance your coding efficiency and streamline your problem-solving process.

Table of Contents

Introduction

Competitive programming is a challenging and rewarding activity that involves solving algorithmic problems within a set timeframe. To maximize efficiency, having a well-configured development environment is crucial. This repository provides a comprehensive setup for VS Code and Geany, two popular code editors among competitive programmers. Follow the instructions below to configure your setup and get started with competitive programming.

Prerequisites

To set up your environment for competitive programming, ensure you have the following prerequisites installed as per your operating system:

Windows

Linux

  • GCC/G++: Install via package manager:
    sudo apt install build-essential

Setting up VS Code

  1. Install Visual Studio Code: Download and install VS Code from the official website.

  2. Install Extensions: Enhance your coding experience with the following extensions:

    • C/C++: Provides IntelliSense, debugging, and code browsing.
    • Competitive Programming Helper (cph): Quickly compile, run and judge competitive programming problems in VS Code. Automatically download testcases , or write & test your own problems. Once you are done, easily submit your solutions directly with the click of a button!
      • CPH Config
        1. Install cph in VS Code and open any folder.
        2. Install competitive companion in your browser.
        3. Use Companion by pressing the green plus (+) circle from the browser toolbar when visiting any problem page.
        4. The file opens in VS Code with testcases preloaded. Press Ctrl+Alt+B to run them.
        5. Install the cph-submit browser extension to enable submitting directly on CodeForces.
        6. (optional) Add this two lines in your vs code setting.json file (if you use c++).
          "cph.language.cpp.SubmissionCompiler": "GNU G++20 13.2 (64 bit, winlibs)",
          "cph.general.defaultLanguage": "cpp",
          
    • Code Runner: Allows you to run code and execute custom command easily.
  3. Set Up User Snippets: A user snippet typically refers to a piece of code or text that users can insert into a larger codebase or document to accomplish a specific task or function. These snippets are often used to save time, ensure consistency, and reduce errors by reusing commonly used code or text. They can be manually created by users or provided by integrated development environments (IDEs) and text editors to facilitate coding and writing.

    • Set Up
      1. Write your desired code.
      2. Copy and Paste it into Snippet-Generator website.
      3. Copy your generated snippet and back to VS Code.
      4. Click lower-left corner gear icon.
      5. Then Spnippets -> cpp (or your used language).
      6. Paste your user generated snippet.

    If you faced any problem then watch this YouTube Video N.B: This is my User Snippet(C++). Just Copy Paste. Type ff to trigger code templete.

  4. Keybindings (Optional): A keybinding (or key binding) is a specific key or combination of keys on a keyboard that is mapped to perform a particular action within software. Keybindings are used to create shortcuts that can enhance productivity and efficiency by allowing users to quickly execute commands without navigating through menus or using a mouse. These shortcuts can often be customized to suit individual preferences or workflow needs.

Setting up Geany (Optional)

  1. Install Geany: Download and install Geany from the official website.
  2. Configure Build Commands:
    • C/C++: Set up custom build commands for compiling and running C/C++ programs.
    • Python: Configure the build menu to execute Python scripts.
  3. Customize Preferences: Adjust editor preferences for optimal coding efficiency, such as enabling line numbers, syntax highlighting, and auto-completion.
  4. Set Up Templates: Create code templates for quick access during competitions.

Contact

For any questions or feedback, please contact.

nxtsourav7 nxtsourav7 nxtsourav7

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published