ACM模板

注:本文为个人向,有的是高中写的/网上找的,代码风格很奇怪

0 其他

0.1 vimrc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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 线段树 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 ...

NOIP代码

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