Skip to content

Instantly share code, notes, and snippets.

@zenito9970
Last active June 3, 2019 21:37
Show Gist options
  • Save zenito9970/c4b5007babdf10ba8097bb77d3d1ee86 to your computer and use it in GitHub Desktop.
Save zenito9970/c4b5007babdf10ba8097bb77d3d1ee86 to your computer and use it in GitHub Desktop.
VSCodeのユーザスニペット(C++)
{
/*
// Place your snippets for C++ here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, ${id} and ${id:label} and ${1:label} for variables. Variables with the same id are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
*/
"AtCoder Snippet": {
"prefix": "atcodes;",
"body": [
"#include <bits/stdc++.h>",
"#define FOR(i,a,b) for(int i=(a);i<(b);++i)",
"#define rep(i,n) FOR(i,0,n)",
"#define repr(i,n) for(int i=(n)-1;0<=i;--i)",
"#define each(e,v) for(auto&& e:(v))",
"#define all(v) begin(v),end(v)",
"#define dump(x) cerr<<#x<<\": \"<<(x)<<endl",
"using namespace std;",
"using vint = vector<int>;",
"using ll = long long;",
"using vll = vector<ll>;",
"template <class T> void chmin(T& a, const T& b) { a = min(a, b); }",
"template <class T> void chmax(T& a, const T& b) { a = max(a, b); }",
"void yes() { cout << \"Yes\" << endl; exit(0); }",
"void no() { cout << \"No\" << endl; exit(0); }",
"",
"int main() {",
"\t//$1",
"\treturn 0;",
"}",
""
],
"description": "AtCoder's template code."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment