缺省源

#include <bits/stdc++.h>

#define x first
#define y second
#define pb push_back
#define mp make_pair
#define inf (0x3f3f3f3f)
#define SZ(x) ((int)x.size())
#define ALL(x) x.begin(), x.end()
#define Set(a, b) memset(a, b, sizeof(a))
#define Cpy(a, b) memcpy(a, b, sizeof(a))
#define DEBUG(...) fprintf(stderr, __VA_ARGS__)
#define debug(x) cout << #x << " = " << x << endl
#define Rep(i, a) for (int i = 0, i##end = (a); i < i##end; ++ i)
#define For(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++ i)
#define Forr(i, a, b) for (int i = (a), i##end = (b); i >= i##end; -- i)
#define Travel(i, u) for (int i = head[u], v = to[i]; i; v = to[i = nxt[i]]) namespace IO { const int N = 1e6; static char s[N], *S = s, *T = s, t[N], *E = t; inline void flush() { fwrite(t, 1, E - t, stdout), E = t; } inline char getc() {
if (S == T) T = (S = s) + fread(s, 1, N, stdin);
return S == T ? 0 : *S ++;
} inline void putc(char c) {
if (E == t + N - 1) flush();
*E ++ = c;
}
} using IO::getc;
using IO::putc;
using IO::flush;
using namespace std;
using ll = long long;
using PII = pair <int, int>; template <class T>
inline T read() {
T ___ = 1, __ = getc(), _ = 0;
for (; !isdigit(__); __ = getc())
if (__ == '-') ___ = -1;
for (; isdigit(__); __ = getc())
_ = _ * 10 + __ - 48;
return _ * ___;
} template <class T>
inline void write(T _, char __ = '\n') {
if (!_) putc(48);
if (_ < 0) putc('-'), _ = -_;
static int sta[111], tp;
for (sta[tp = 0] = __; _; _ /= 10)
sta[++ tp] = _ % 10 + 48;
while (~tp) putc(sta[tp --]);
} template <class T>
inline bool chkmax(T &_, T __) {
return _ < __ ? _ = __, 1 : 0;
} template <class T>
inline bool chkmin(T &_, T __) {
return _ > __ ? _ = __, 1 : 0;
} inline void proStatus() {
ifstream t("/proc/self/status");
cerr << string(istreambuf_iterator <char> (t), istreambuf_iterator <char> ());
} signed main() { freopen(".in", "r", stdin);
freopen(".out", "w", stdout); return flush(), 0;
}

Vimrc

set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
syntax on
"高亮
set cindent
set smartindent
set autoindent
"set cin
"set si
"set ai
set tabstop=4
set shiftwidth=4
set softtabstop=4
"set ts=4
"set sw=4
"set sts=4
"缩进
set mouse=a
"Linux鼠标使用
color molokai
"colo desert
"主题
set number
"set nu
"行号
set guifont=Consolas\ h15
"Linux: set guifont=Consolas\ h16
set backspace=2
"set bs=2
set clipboard=unnamed
"共享剪切板
set go=
set nobackup
"set cursorline
set autoread
"set cursorcolumn function! Open()
exec "vsp %<.out"
exec "sp %<.in"
endfunction au GUIEnter * call libcallnr("vimtweak.dll", "SetAlpha", 210) "自动透明 syntax enable map<F4> <Esc>:call Open() <CR>
imap<F4> <Esc>:call Open() <CR>
map<F6> <Esc>:sp<CR><C-W>j: e %<.out<CR><Esc>:vsp %<.in<CR>
imap<F6> <Esc>:sp<CR><C-W>j: e %<.out<CR><Esc>:vsp %<.in<CR> "map <F9> <ESC>:w<CR>:!g++ % -o %< -Wall -Wshadow -Wextra -lm <CR>
"imap <F9> <ESC>:w<CR>:!g++ % -o %< -Wall -Wshadow -Wextra -lm <CR> "map <F10> <ESC>:!./%<<CR>
"imap <F10> <ESC>:!./%<<CR> "map<F8> <F9> <F10>
"imap<F8> <F9> <F10>
" map <C-F9> <ESC>:w<CR>:!g++ ./% -o ./%< -O2 -Dylsakioi -Wall -Wshadow -Wextra -lm -fsanitize=address -fsanitize=undefined<CR>
imap <C-F9> <ESC>:w<CR>:!g++ ./% -o ./%< -O2 -Dylsakioi -Wall -Wshadow -Wextra -lm -fsanitize=address -fsanitize=undefined<CR> map <F9> <ESC>:w<CR>:!g++ ./% -o ./%< -Dylsakioi -Wall -Wshadow -Wextra<CR>
imap <F9> <ESC>:w<CR>:!g++ ./% -o ./%< -Dylsakioi -Wall -Wshadow -Wextra<CR> map<C-F10> <Esc>:w<CR>:!g++ % -o %< -Dylsakioi -O2<CR>
imap<C-F10> <Esc>:w<CR>:!g++ % -o %< -Dylsakioi -O2<CR> map <F10> <ESC>:!./%<<CR>
imap <F10> <ESC>:!./%<<CR> map<F8> <F9> <F10>
imap<F8> <F9> <F10> map<C-F8> <Esc>:!g++ ./% -o ./%< -Dylsakioi -pg<CR><Esc>:!time ./%<<CR><Esc>:!gprof ./%< > res_%<.txt<CR>
imap<C-F8> <Esc>:!g++ ./% -o ./%< -Dylsakioi -pg<CR><Esc>:!time ./%<<CR><Esc>:!gprof ./%< > res_%<.txt<CR> map<C-a> <ESC>ggVG
imap<C-a> <ESC>ggVG map<C-F5> i#include <bits/stdc++.h><CR><CR>#define x first<CR>#define y second<CR>#define pb push_back<CR>#define mp make_pair<CR>#define inf (0x3f3f3f3f)<CR>#define SZ(x) ((int)x.size())<CR>#define ALL(x) x.begin(), x.end()<CR>#define Set(a, b) memset(a, b, sizeof(a))<CR>#define Cpy(a, b) memcpy(a, b, sizeof(a))<CR>#define DEBUG(...) fprintf(stderr, __VA_ARGS__)<CR>#define debug(x) cout << #x << " = " << x << endl<CR>#define Rep(i, a) for (int i = 0, i##end = (a); i < i##end; ++ i)<CR>#define For(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++ i)<CR>#define Forr(i, a, b) for (int i = (a), i##end = (b); i >= i##end; -- i)<CR>#define Travel(i, u) for (int i = head[u], v = to[i]; i; v = to[i = nxt[i]])<CR><CR>namespace IO { <CR><CR>const int N = 1e6;<CR><CR>static char s[N], *S = s, *T = s, t[N], *E = t;<CR><CR>inline void flush() { fwrite(t, 1, E - t, stdout), E = t; }<CR><CR>inline char getc() {<CR>if (S == T) T = (S = s) + fread(s, 1, N, stdin);<CR>return S == T ? 0 : *S ++;<CR>}<CR><CR>inline void putc(char c) {<CR>if (E == t + N - 1) flush();<CR>*E ++ = c;<CR>}<CR>}<CR><CR>using IO::getc;<CR>using IO::putc;<CR>using IO::flush;<CR>using namespace std;<CR>using ll = long long;<CR>using PII = pair <int, int>;<CR><CR>template <class T><CR>inline T read() {<CR>T ___ = 1, __ = getc(), _ = 0;<CR>for (; !isdigit(__); __ = getc())<CR>if (__ == '-') ___ = -1;<CR>for (; isdigit(__); __ = getc())<CR>_ = _ * 10 + __ - 48;<CR>return _ * ___;<CR>}<CR><CR>template <class T><CR>inline void write(T _, char __ = '\n') {<CR>if (!_) putc(48);<CR>if (_ < 0) putc('-'), _ = -_;<CR>static int sta[111], tp;<CR>for (sta[tp = 0] = __; _; _ /= 10)<CR>sta[++ tp] = _ % 10 + 48;<CR>while (~tp) putc(sta[tp --]);<CR>}<CR><CR>template <class T><CR>inline bool chkmax(T &_, T __) {<CR>return _ < __ ? _ = __, 1 : 0;<CR>}<CR><CR>template <class T><CR>inline bool chkmin(T &_, T __) {<CR>return _ > __ ? _ = __, 1 : 0;<CR>}<CR><CR>inline void proStatus() {<CR>ifstream t("/proc/self/status");<CR>cerr << string(istreambuf_iterator <char> (t), istreambuf_iterator <char> ());<CR>}<CR><CR>signed main() {<CR><CR>freopen(".in", "r", stdin);<CR>freopen(".out", "w", stdout);<CR><CR>return flush(), 0;<CR>}<ESC>1Gzf78G imap<C-F5> <Esc><F5> map<F5> i#include <bits/stdc++.h><CR><CR>#define x first<CR>#define y second<CR>#define pb push_back<CR>#define mp make_pair<CR>#define inf (0x3f3f3f3f)<CR>#define SZ(x) ((int)x.size())<CR>#define Set(a, b) memset(a, b, sizeof(a))<CR>#define Cpy(a, b) memcpy(a, b, sizeof(a))<CR>#define Rep(i, a) for (int i = 0; i < a; ++ i)<CR>#define For(i, a, b) for (int i = a; i <= b; ++ i)<CR>#define Forr(i, a, b) for (int i = a; i >= b; -- i)<CR>#define Travel(i, x) for (int i = head[x]; i; i = nxt[i])<CR><CR>using namespace std;<CR><CR>typedef long long ll;<CR>typedef pair<int, int> PII;<CR><CR>template<class T>inline T read(T &_) {<CR>T __ = getchar(), ___ = 1; _ = 0;<CR>for (; !isdigit(__); __ = getchar()) if (__ == '-') ___ = -1;<CR>for (; isdigit(__); __ = getchar()) _ = (_ << 3) + (_ << 1) + (__ ^ 48);<CR>return _ *= ___;<CR>}<CR><CR>template<class T>inline bool chkmax(T &_, T __) { return _ < __ ? _ = __, 1 : 0; }<CR>template<class T>inline bool chkmin(T &_, T __) { return _ > __ ? _ = __, 1 : 0; }<CR><CR>inline void proStatus() {<CR>ifstream t("/proc/self/status");<CR>cerr << string(istreambuf_iterator<char>(t), istreambuf_iterator<char>());<CR>}<CR><CR>int main() {<CR><CR>return 0;<CR>}<Esc>kk
"map<F5> i#include<bits/stdc++.h><CR>#include<bits/extc++.h><CR><CR>#define file(s) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout)<CR>#define go(x, i) for(register int i = head[x]; i; i = nxt[i])<CR>#define For(i, a, b) for(register int i = (a), i##_end_ = (b); i <= i##_end_; ++ i)<CR>#define FOR(i, a, b) for(register int i = (a), i##_end_ = (b); i >= i##_end_; -- i)<CR>#define debug(x) cout << #x << " = " << x << endl<CR>#define mem(a, b) memset(a, b, sizeof(a))<CR>#define cpy(a, b) memcpy(a, b, sizeof(a))<CR>#define inf (0x3f3f3f3f)<CR>#define INF (1e18)<CR>#define pb push_back<CR>#define mp make_pair<CR>#define x first<CR>#define y second<CR>#define y1 orzorz<CR><CR>typedef unsigned long long ull;<CR>typedef unsigned int uint;<CR>typedef long long ll;<CR>typedef std::pair<ll, int> PLI;<CR>typedef std::pair<int, int> PII;<CR>typedef long double ldb;<CR>typedef double db;<CR><CR>namespace IO {<CR>#define getc() ((S_ == T_) && (T_ = (S_ = Ch_) + fread(Ch_, 1, Buffsize, stdin), S_ == T_) ? 0 : *S_ ++)<CR>#define putc(x) *nowps ++ = (x)<CR><CR>const uint Buffsize = 1 << 15, Output = 1 << 23;<CR>static char Ch_[Buffsize], *S_ = Ch_, *T_ = Ch_;<CR>static char Out[Output], *nowps = Out;<CR><CR>inline void flush() {fwrite(Out, 1, nowps - Out, stdout); nowps = Out;}<CR>template<class T>inline bool chkmax(T &_, T __) {return _ < __ ? _ = __, 1 : 0;}<CR>template<class T>inline bool chkmin(T &_, T __) {return _ > __ ? _ = __, 1 : 0;}<CR><CR>template<class T>inline void read(T &_) {<CR>_ = 0; static char __; T ___ = 1;<CR>for(__ = getc(); !isdigit(__); __ = getc()) if(__ == '-') ___ = -1;<CR>for(; isdigit(__); __ = getc()) _ = (_ << 3) + (_ << 1) + (__ ^ 48);<CR>_ *= ___;<CR>}<CR><CR>template<class T>inline void write(T _, char __ = '\n') {<CR>if(!_) putc('0');<CR>if(_ < 0) putc('-'), _ = -_;<CR>static uint sta[111], tp;<CR>for(tp = 0; _; _ /= 10) sta[++ tp] = _ % 10;<CR>for(; tp; putc(sta[tp --] ^ 48)); putc(__);<CR>}<CR><CR>inline void procStatus() {<CR>std::ifstream t("/proc/self/status");<CR>std::cerr << std::string(std::istreambuf_iterator<char>(t), std::istreambuf_iterator<char>());<CR>}<CR>}<CR><CR>using namespace std;<CR>using namespace IO;<CR><CR>int main() {<CR>#ifdef ylsakioi<CR>file("");<CR>#endif<CR>return flush(), 0;<CR>}<Esc> imap<F5> <Esc><F5>

缺省源和 Vim 配置的更多相关文章

  1. acm的ubuntu (ubuntu16.04 安装指南,chrome安装,vim配置,git设置和github,装QQ)

    日常手贱把ubuntu14.04更新到了16.04,然后就game over了.mdzz,不然泥萌也看不到这篇博客了=.= 然后花了些时间重装了一个16.04版的,原来那个14.04的用可以用,就是动 ...

  2. 简单快捷好用的vim配置和终端配置推荐

    vim 配置实用spf13-vim,安装方便简单快捷,极力推荐. 另外oh-my-zsh 终端配置很好,与之搭配使用效果更佳. 安装都很简单,一个脚本搞定, 都是在gitHub上开源的,自行搜索,这里 ...

  3. 快速学习C语言三: 开发环境, VIM配置, TCP基础,Linux开发基础,Socket开发基础

    上次学了一些C开发相关的工具,这次再配置一下VIM,让开发过程更爽一些. 另外再学一些linux下网络开发的基础,好多人学C也是为了做网络开发. 开发环境 首先得有个Linux环境,有时候家里机器是W ...

  4. centos vim配置高亮语法和格式化粘贴

    centos vim配置高亮语法和格式化粘贴 设置vim别名和高亮grep词语 echo -e "\nalias vi=vim\nalias grep='grep --color'\n&qu ...

  5. vim配置方法

    /etc/vimrc (公共的) ~/.vimrc (私人的) rpm -qa|grep vim 这个命令,如何vim已经正确安装,则会显示上面三个包的名称 全部安装 yum -y install v ...

  6. VIM配置相关记录

    把一直使用中的vim配置做个GIT入库管理,也把之前积累在机器上的文档,做个汇总. https://github.com/wujuguang/kyvim 1. 安装完整版vim vi和vim的区别?在 ...

  7. Vim配置及说明——IDE编程环境

    Vim配置及说明——IDE编程环境 Vim配置及说明——IDE编程环境 1.基本及字体 2.插件管理 3.主题风格 4.窗口设置 5.目录树导航 6.标签导航 7.taglist 8.多文档编辑 9. ...

  8. Env:VIM配置

    注:文章来自于http://www.cnblogs.com/ma6174/archive/2011/12/10/2283393.html 花了很长时间整理的,感觉用起来很方便,共享一下. 我的vim配 ...

  9. vim配置python开发环境

    vim配置python开发环境 一.安装vim sudo apt-get install vim 二.vim基础配置 #Centos6.5 /usr/share/vim/vim72 vi /etc/v ...

随机推荐

  1. Linux awk使用方法~~整理

    目录 awk行处理方式 awk命令格式 命令行格式 脚本格式 命令行格式——基本格式 awk内置变量 awk内置函数 测试数据 awk变量和函数使用实例 逻辑判断式 扩展格式 BEGIN 和 END ...

  2. 文件搜索神器之everything

    之前我提到了,在本地快速的进行文件的检索是平常工作中必要的部分,一个好的搜索软件会大大的提升我们的工作效率.就是它,everything,官方的网站地址是http://www.voidtools.co ...

  3. hdu1421_搬寝室

    题目:搬寝室 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1421 #include<stdio.h> #include<algor ...

  4. 重构客户注册-基于ActiveMQ实现短信验证码生产者

    重构目标:将bos_fore项目中的CustomerAction作为短信消息生产者,将消息发给ActiveMQ,创建一个单独的SMS项目,作为短信息的消费者,从ActiveMQ获取短信消息,调用第三方 ...

  5. Python cmd库的简易使用

    简单记录一下,竟然这么简单的方法就能在 python 里面实现一个简单的交互式命令行以前从来没有尝试过. 上一个完整的例子: import cmd import osimport readline r ...

  6. k8s授权访问

    #监听本地的8080端口 kubectl  proxy --port=8080 [root@k8s-m ~]# kubectl proxy --port=8080Starting to serve o ...

  7. Guava Cache源码详解

    目录 一.引子 二.使用方法 2.1 CacheBuilder有3种失效重载模式 2.2 测试验证 三.源码剖析 3.1 简介 3.2 源码剖析 四.总结 优点: 缺点: 正文 回到顶部 一.引子 缓 ...

  8. Servlet的cookie使用,500报错,tomcat和cookie语法不兼容解决

    出现类似上图的错误,应该是tomcat和cookie的语法不兼容 cookie不要用逗号","作分隔符,换井号#试试就可以了

  9. delphi中adoquery控件中某个字段Onvalidate事件的用法?

    procedure TForm2.ADOQuery1TestFieldValidate(Sender: TField);begin// Sender就是当前字段,可以在这里对Sender字段进行各种操 ...

  10. 微信小程序flex佈局

    聲明:display:flex 換行flex-wrap:flex-wrap:nowrap(不換行).wrap(換行).wrap-reserve(第一行在下面): 主軸對齊(橫向對齊)justify-c ...