所有缺省源
所有缺省源
.bashrc
cvim(){
str="$1"
if [ ${str:0-4} = ".cpp" ] && [ ! -f "$1" ];then
cp ~/.main.cpp ./$1
fi
vim $1
}
alias vim='cvim'
rm(){
mv $@ ~/.trash
}
ct(){
name=${PWD##*/}
g++ -std=c++14 -O2 -Wall -Wextra $name.cpp -o $name
for i in "$@";do
echo "---------test on $i----------"
cp ./$name$i.in ./$name.in
./$name
if ! diff -ZB $name$i.ans $name.out;then break;fi
done
}
left(){
tim=$(( $(date +%s -d "13:00:00") - $(date +%s) ))
echo "$((tim/3600)):$((tim/60%60)):$((tim%60))"
}
alias cl='clear'
mkdir .trash
cd 桌面/SX-0005
.vimrc
set nu
set si
set ts=4
set sw=4
set sts=4
set so=10
set mouse=a
map <F5> :!clear<CR><CR>
map <F6> :w<CR>:!g++ -std=c++17 -DDEBUG -fsanitize=undefined,address -Wall -Wextra % -o %:r;cat data;echo '----------start----------';./%:r < data<CR>
.main.cpp
#include<bits/stdc++.h>
#define F(i,j,k) for(auto i=j;i<=(decltype(j))(k);i++)
#define exec(...) [&](){__VA_ARGS__}()
#define view(x) begin(x),end(x)
#define pb push_back
#define lambda [&]
#define x first
#define y second
#define endl '\n'
#define os ostream
using namespace std;
using ll=long long;
template<typename T>void ckmin(T& a,T b){if(a>b) a=b;}
template<typename T>void ckmax(T& a,T b){if(a<b) a=b;}
#ifdef DEBUG
template<typename ...T>os& operator<<(os& out,tuple<T...> x);
template<typename T1,typename T2>os& operator<<(os& out,pair<T1,T2> x){return out<<tuple(x);}
template<typename T,typename=decltype(T().begin()),typename=enable_if_t<!is_same_v<decay_t<T>,string>>>os& operator<<(os& out,T x){return out<<"{",exec(auto n=0u;for(auto i:x) out<<i<<(++n==x.size()?"":",");),out<<"}";}
template<typename ...T>os& operator<<(os& out,tuple<T...> x){return apply(lambda(T... xx){auto n=0u;out<<"{";((out<<xx<<(++n==sizeof...(T)?"":",")),...),out<<"}";},x),out;}
#define debug(...) cerr<<"#"<<__LINE__<<": "<<#__VA_ARGS__<<" = "<<tuple(__VA_ARGS__)<<endl
#define dbgexec(...) exec(__VA_ARGS__)
#else
#define debug(...) (void)0
#define dbgexec(...) (void)0
#endif
signed main(){
#ifndef DEBUG
#define FILENAME ""
[](...){}(freopen(FILENAME ".in","r",stdin),freopen(FILENAME ".out","w",stdout));
#endif
cin.tie(0)->sync_with_stdio(0);
return not "FST";
}
/*
*
*
*
*
*
*
*
*/
duipai.sh (需要对拍的时候再写)
cnt=1
while true;do
./gen>data
./zhengjie<data>out
./baoli<data>stdout
(( cnt=cnt+1 ))
echo "$cnt"
if ! diff -ZB out stdout;then exit;fi
done

浙公网安备 33010602011771号