LoginSignup
0
0

競プロで使用できるvscodeのスニペット(C++)

Posted at

はじめに

こちらは仮で上げているモノですので、清書したものをいずれ出す予定です。

C++のスニペット

cpp.json
	"C++ Template Class": {
		"prefix": "cpptemplate",
		"body": [
			"/**",
			"	* filename: ${TM_FILENAME}",
			"	* author: teniwoha",
			"	* X: @RyutaUrushi",
			"	* created: $CURRENT_MONTH/$CURRENT_DATE/$CURRENT_YEAR $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
			"	* result: ",
			"	**/",
			"#include <bits/stdc++.h>",
			"using namespace std;",
			"",
			"/* alias */",
			"using ull = unsigned long long;",
			"using ll = long long;",
			"using vi = vector<int>;",
			"using vll = vector<ll>;",
			"using vvi = vector<vi>;",
			"using vvll = vector<vll>;",
			"using vs = vector<string>;",
			"using pii = pair<int, int>;",
			"",
			"/* define short */",
			"#define pb push_back",
			"#define mp make_pair",
			"#define SZ(x) ((int)(x).size())",
			"#define bit(n) (1LL<<(n))",
			"#define rep(i, a, b) for (int i = a; i < b; i++)",
			"#define rrep(i, a, b) for (int i = a; i >= b; i--)",
			"#define fore(i,a) for(auto &i:a)",
			"#define all(obj) (obj).begin(), (obj).end()",
			"#define rall(obj) (obj).rbegin(), (obj).rend()",
			"",
			"",
			"int main() {",
			"\t",
			"}",
			""
		],
		"description": "C++ Template Class"
	}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0