备忘

一些杂物TAT

vim(如果提供的话)配置文件

.vimrc
set nocompatible
set syntax=on
set nu
set cindent
set smartindent
set autoindent

对拍

check.sh
#!/bin/bash

for((;1;))
do
    ./gen
echo "ans:"
time ./ans
echo "brute"
time ./brute
diff a.std a.out
if [ $? -ne "0" ]; then
    echo "fail"
    exit
else
    echo "pass"
fi
done

编译脚本……(如果必要的话)

compile.sh
#!/bin/bash

rm $1
g++ $1.cpp -o $1 -Wall -g -Wextra
echo "-----------running----------"
./$1
echo "----------------------------"

Comments

comments powered by Disqus