【无标题】

VSCode用户代码片段

{
	// Place your snippets for cpp 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, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
	// same ids are connected.
	// Example:
	"leetcode": {
		"prefix": "leetcode",
		"body": [
			"#include<bits/stdc++.h>",
			"using namespace std;",
			"",
			"int main() {",
			"    ",
			"    system(\"pause\");",
			"    return 0;",
			"}"
		],
		"description": "Log output to console"
	},
	"compete": {
		"prefix": "mb",
		"body": [
			"#include<bits/stdc++.h> ",
			"#define reg register",
			"#define ll long long",
			"#define ull unsigned long long",
			"#define iINF 0x3f3f3f3f",
			"#define lINF (1ll << 60)",
			"#define eps 1e-8",
			"#define pi acos(-1.0)",
			"#define e exp(1.0)",
			"#define ios ios::sync_with_stdio(false)",
			"#define rep(i,l,r) for(int i=l;i<r;i++)",
			"#define per(i,r,l) for(int i=r;i>=l;i--)",
			"using namespace std;",
			"const int maxn = 2e6 + 7;",
			"const int mod = 1e9 + 7;",
			"template<class T>inline void read(T &res){",
			"  char c;T flag = 1;",
			"  while((c = getchar()) < '0' || c > '9')if(c == '-')flag = -1;res = c - '0';",
			"  while((c = getchar()) >= '0' && c <= '9')res = res * 10 + c - '0'; res *= flag;",
			"}",
			"template<class T>inline void write(T x){",
			"  if(x < 0) putchar('-'),x = -x;",
			"  if(x > 9) write(x/10);",
			"  putchar(x % 10 + '0');",
			"}",
			"ll MyPow(ll a, ll b){ ll sum = 1;while (b) {if (b & 1) {sum = (sum * a) % mod;b--;}b /= 2;a = a * a % mod;}return sum;}",
			"ll gcd(ll a,ll b){ return b==0?a:gcd(b,a%b); }",
			"ll isprime(ll n){if(n <= 1) return 0;if(n == 2) return 1;rep(i, 2, sqrt(n) + 1) if(n % i == 0) return 0;return 1;}",
			"int main() {",
			" ",
			"  return 0;",
			"}"
		],
		"description": "Log output to console"
	}
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值