我的配置

本地

syntax on
set number
set mouse=a
set tabstop=4
set shiftwidth=4
set autoindent
set smartindent
set showmatch

set autoread
set autochdir
set nobackup
set noswapfile
set nocompatible

imap { {<CR>}<ESC>kA

map <F3> :call Cut()<CR><c-w>l
func! Cut()
    exec '40vs %<.out'
    exec 'w'
    exec 'sp %<.in'
    exec 'w'
endfunc
map <F2> <c-w>h:call Close()<cr>
func! Close()
    exec 'wq'
    exec 'wq'
endfunc

map <F7> :call Compile()<CR>
func! Compile()
    exec 'w'
    if &filetype == 'cpp'
        exec '!g++ % -g -o %< -Wall -lm -ftrapv -fsanitize=address'
    elseif &filetype == 'tex'
        exec '!xelatex %<'
    elseif &filetype == 'sh'
        exec '!sh %<'
    endif
endfunc
imap <F7> <ESC>:w<CR><F7> <CR>

map <F8> :!time ./%< <CR>
imap <F8> <ESC>:!time ./%< <CR>

map <F9> :w<CR>
imap <F9> <ESC>:w<CR>

map <c-a> ggvG$
imap <c-a> ggvG$
map <c-c> "+Y
imap <c-c> "+Y
map <c-v> "+P
imap <c-v> "+P

map <c-h> 7h
map <c-j> 7j
map <c-k> 7k
map <c-l> 7l
map <c-up> 7k
map <c-down> 7j
map <c-left> 7h
map <c-right> 7l

map `1 :0r ~/模板/asd.cpp<CR>
map `2 :0r ~/模板/graph.cpp<CR>
map `3 :0r ~/模板/math.cpp<CR>

考场配置 , 共\(28\)

syntax on
color torte
set number
set mouse=a

set tabstop=4
set shiftwidth=4
set autoindent
set smartindent
set showmatch

set autoread
set autochdir
set nobackup
set noswapfile
set nocompatible

imap { {<CR>}<ESC>kA

map <F9> :w<CR>
imap <F9> <ESC>:w<CR>

map <F7> :w<CR>:!g++ % -o %< -g -Wall <CR>
imap <F7> <ESC>:w<CR>:!g++ % -o %< -g -Wall <CR>

map <F8> :!time ./%< <CR>
imap <F8> <ESC>:!time ./%< <CR>

\(asd.cpp\)

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define debug(...) fprintf(stderr,__VA_ARGS__)
#define Debug(x) cout<<#x<<"="<<x<<endl
using namespace std;
typedef long long LL;
const int INF=1e9+7;
inline LL read(){
    register LL x=0,f=1;register char c=getchar();
    while(c<48||c>57){if(c=='-')f=-1;c=getchar();}
    while(c>=48&&c<=57)x=(x<<3)+(x<<1)+(c&15),c=getchar();
    return f*x;
}

int main(){
#ifndef file
    freopen("asd.in","r",stdin);
    freopen("asd.out","w",stdout);
#endif
}

\(graph.cpp\)

#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#define debug(...) fprintf(stderr,__VA_ARGS__)
#define Debug(x) cout<<#x<<"="<<x<<endl
using namespace std;
typedef long long LL;
const int INF=1e9+7;
inline LL read(){
    register LL x=0,f=1;register char c=getchar();
    while(c<48||c>57){if(c=='-')f=-1;c=getchar();}
    while(c>=48&&c<=57)x=(x<<3)+(x<<1)+(c&15),c=getchar();
    return f*x;
}

const int N=100005;
const int M=200005;

struct Edge{
    int v,w,nxt;
}e[M];
int first[N],Ecnt=0;
inline void Add_edge(int u,int v,int w=0){
    e[++Ecnt]=(Edge){v,w,first[u]};
    first[u]=Ecnt;
}

int main(){
#ifndef file
    freopen("asd.in","r",stdin);
    freopen("asd.out","w",stdout);
#endif
}

\(math.cpp\)

#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long LL;
const int INF=1e9+7;
inline LL read(){
    register LL x=0,f=1;register char c=getchar();
    while(c<48||c>57){if(c=='-')f=-1;c=getchar();}
    while(c>=48&&c<=57)x=(x<<3)+(x<<1)+(c&15),c=getchar();
    return f*x;
}

namespace Math{
    const int mod=998244353;
    inline int add(int x,int y,int p=mod){x+=y;return x>=p?x-p:x;}
    inline int dec(int x,int y,int p=mod){x-=y;return x<0?x+p:x;}
    inline int mul(LL x,int y,int p=mod){x*=y;return x>=p?x%p:x;}
    inline int qpow(int a,int b,int p=mod){
        int res=1;
        while(b){
            if(b&1) res=mul(res,a,p);
            a=mul(a,a,p);
            b>>=1;
        }
        return res;
    }
}using namespace Math;

int main(){
}

转载于:https://www.cnblogs.com/lizehon/p/10602775.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值