0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

VSCodeで競プロC++のテンプレート

Last updated at Posted at 2020-03-09

VSCodeで自分が作ったスニペットを公開しておきます。

cpp.json
{
	"Print to console": {
        "prefix": "tmp",
        "body": [
            "#include <bits/stdc++.h>",
            "using namespace std;",
            "typedef long long ll;",
            "typedef unsigned long long ull;",
            "typedef long double ld;",
			"#define REP(i,n) for(int i=0; i<(n); i++)",
			"#define REPR(i, n) for(int i = n;i >= 0;i--)",
            "#define FOR(i, m, n) for(int i = m;i < n;i++)",
			"#define ALL(n) begin(n),end(n)",
			"#define IN(a, x, b) (a<=x && x<b)",
			"#define INIT std::ios::sync_with_stdio(false);std::cin.tie(0);",
			"template<class T> inline T CHMAX(T & a, const T b) { return a = (a < b) ? b : a; }",
            "template<class T> inline T CHMIN(T & a, const T b) { return a = (a > b) ? b : a; }",
			"",
            "const long double EPS = 1e-10;",
            "const long long INF = 1e18;",
			"const long double PI = acos(-1.0L);",
			"",
            "int main()",
			"{",
			"    INIT;",
			"",
            "    return 0;",
            "}"
            ],
        "description": "template for competitive programming in cpp"
    }
}
0
2
1

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
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?