Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>C++ CP SnippetsNew to Visual Studio Code? Get it now.
C++ CP Snippets

C++ CP Snippets

Benjamin Lu

|
1,816 installs
| (1) | Free
C++ Snippets for competitive programming
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

C++ Competitive Programming Snippets

Forget the trivialities and focus on the solution 🏆!

Description

These snippets are meant for competitive programming and are written in C++.
The code takes inspiration from Jinagly's, Tourist's, and other high ranking competitive programmer's submissions.

More features will be added in the future.

Snippets

cpb - Basic boilerplate
cpbt - Basic boilerplate with testcases
for - Customizable for loop
fori - Incrementing for i loop while smaller than n
forj - Incrementing for j loop while smaller than n
cint - Initializes new integer from input
cstr - Initializes new string from input

Usage

Snippets will be shown in intellisense.
Just type the name of a snippet and you're good to go!

Contribute

Contributions are welcome!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft