/CP-workspace

My VSCode workspace for Competitive Programming

Primary LanguageC++GNU General Public License v3.0GPL-3.0

CP-workspace

GitHub

My VSCode workspace for Competitive Programming. Only for Linux

Features

Usage

  • Install VSCode and GCC
  • Install VSCode extensions listed in .vscode/extensions.json (DO NOT use IntelliSense from ms-vscode.cpptools)
  • (Optional) You can add key bindings by copying the contents of .vscode/keybindings.json into your keybindings.json
# Clone repo
git clone --recursive git@github.com:Tiphereth-A/CP-workspace.git

# Fix paths
cd CP-workspace
mkdir bin
touch data/in.in

# Run VSCode
code .

# Compile and run main.cpp
./tools/run_cpp.sh . main ./data
# Compile and run pmain.cpp
./tools/run_cpp.sh . pmain ./data

Snippets

name prefix introduction
gcc-ignore-warning gcc-ignore-warning, ignore-warning
hoverline hoverline
KMP-FFT kmp-fft, fft-kmp
stdc++11 stdc++11 Standard libs (C++11)
stdc++98 stdc++98 Standard libs (C++98)

Third library support

Copy your library to lib and start using it!

Example:

  • ac-library

    #include <iostream>
    #include "atcoder/convolution.hpp"
    
    int main() {
        for (auto i : atcoder::convolution_ll({1, 1, 4}, {5, 1, 4}))
            std::cout << i << std::endl;
        return 0;
    }

    output:

    5
    6
    25
    8
    16
    
  • CP-lib from myself

  • dbg-macro

  • magic-cpp

  • testlib