-
个人简介
Sublime Text 配置
使用Vim模式
-
在上方的首选项里点击 " 设置(preferences->settings) "
-
在右侧代码栏里加入这份代码:
"ignored_packages": [],
-
保存,在首选项中打开 " 快捷键设置(preferences ->key bingdings) "
-
改为以下代码:
[ { "keys": ["k", "j"], "command": "exit_insert_mode", "context": [ { "key": "setting.command_mode", "operand": false }, { "key": "setting.is_widget", "operand": false } ] }, ]
保存,完工
编译系统
-
点击新建编译系统(Tools -> Build system -> New build system)
-
改为以下代码: Ubuntu :
{ "encoding": "utf-8", "working_dir": "$file_path", "shell_cmd": "g++ \"$file_name\" -std=c++14 -o \"$file_base_name\"", "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "selector": "source.c++", "variants": [ { "name": "Run", "shell_cmd": "g++ '$file' -std=c++14 -o '$file_base_name' && gnome-terminal -x bash -c \"'${file_path}/${file_base_name}';read -p '\nPress any key to continue...'\"" } ] }
Windows :
{ "shell_cmd": "g++ \"${file}\" -o \"${file_path}/${file_base_name}\" -Wall -std=c++11 -Wextra -g", "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", "working_dir": "${file_path}", "selector": "source.c, source.c++", "variants": [ { "name": "Run", "shell_cmd" : "start cmd /c \"\"${file_path}/${file_base_name}\" & pause\"" }, { "name": "RunInCommand", "shell_cmd" : "g++ \"${file}\" -o \"${file_path}/${file_base_name}\" -Wall -std=c++11 -Wextra -g && start cmd /c \"\"${file_path}/${file_base_name}\" & echo 程序运行结束 & pause\"" }, { "name": "Debug", "shell_cmd" : "start cmd /c \"gdb \"${file_path}/${file_base_name}\"\"" } ] }
保存为 "g++.sublime-build"
-
最后在编译系统中选择"g++"(Tools -> Build system -> g++)
大功告成!
Sublime Text 使用mould
(Tools --> Developer --> New Snippet )
mould
#include <bits/stdc++.h> using namespace std; #define rep(i,l,r) for (int i = (l); i <= (r); i++) #define per(i,r,l) for (int i = (r); i >= (l); i--) #define pb push_back #define eb emplace_back #define mp make_pair #define all(x) (x).begin(),(x).end() #define fi first #define se second #define SZ(x) ((int)(x).size()) #define maxn(a, b) a = max(a, b) #define minn(a, b) a = min(a, b) typedef vector<int> VI; typedef long long ll; typedef pair<int,int> PII; typedef double db; const ll mod = 998244353; mt19937 gen(114514); ll rp(ll a,ll b) {ll res=1%mod;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;} ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;} int main() { return 0; }
read
template <class T> inline void read (T &X){ X = 0;T w = 0; char ch = 0; while (!isdigit (ch)) {w |= ch == '-'; ch = getchar ();} while (isdigit(ch)) X = (X << 3) + (X << 1) + (ch ^ 48), ch = getchar (); if (w) X = -X; }
print
template <class T> void print(T res){ if(res<0){putchar('-'); res=-res;} if(res>9) print(res/10); putchar(res%10+'0'); }
-
-
通过的题目
-
最近活动
题目标签
- 图论
- 59
- 字符串
- 41
- 数据结构
- 21
- 数学
- 17
- KMP
- 16
- 费用流
- 14
- AC自动机
- 13
- 难度分类
- 13
- 模板
- 13
- 最小割
- 12
- 最大流
- 10
- 数论
- 10
- 博弈论
- 10
- 最小费用最大流
- 9
- 网络流
- 9
- 字符串哈希
- 9
- 莫比乌斯反演
- 9
- 动态规划
- 8
- 回文自动机
- 7
- 树论
- 7