ACM模板

0 其他

0.1 vimrc

set ts=4 "tabstop
set sw=4 "shiftwidth
set sc "showcmd
set nu "number
set ru "ruler
set ai "autoindent
set mouse=a
filetype indent on

set et "expandtab
set smarttab
set autowrite

inoremap {<CR> {}<LEFT><CR><CR><UP><TAB>

map <F3> :w<CR>:!gdb %< -q <CR>
nmap <F4> :w<CR>:!g++ % -o %< -g -Wall -fsanitize=address<CR>
imap <F4> <ESC>:w<CR>:!g++ % -o %< -g -Wall -fsanitize=address<CR>
nmap <F5> :w<CR>:!time ./%< <CR>
imap <F5> <ESC>:w<CR>:!time ./%< <CR>

省选复习

1 数据结构 1.1 线段树 #include <iostream>#include <cstdio>using namespace std;const int N=1e5;int n,m,tot,root;struct Tree{ int l,r,ls ...

NOIP代码

1 读入优化 int read(){ int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch> ...