emacs配置(待补)
(global-set-key [f9] 'compile)
(global-set-key [f10] 'gud-gdb)
(global-set-ket (kbd "C-s") 'save-buffer)
(global-set-key (kbd "RET") 'newline-and-indent)
(global-set-key (kbd "C-a") 'mark-whole-buffer)
(setq c-default-style "awk")
(setq default-tab-width 4)
(setq default-cursor-type 'bar)
对拍(Linux):
while true; do
./.../data >1.in
./.../baoli >1.out
./.../mystd >2.out
if diff 1.out 2.out; then
printf "AC
"
else
printf "WA
"
exit 0
fi
done
保存为(.sh)文件,然后终端里输入(sh+)文件路径(拖到里面就好了)执行。
(Windows):
:loop
data.exe > in.txt
std.exe < in.txt > std.txt
ans.exe < in.txt > ans.txt
fc /A std.txt ans.txt
if not errorlevel 1 goto loop
pause
:end