跳到正文

剪贴板

剪贴板 12gwf8kb

原文
剪贴板信息

剪贴板信息

收录
更新
代码
read -p "源代码: " test
read -p "正解: " std
read -p "数据: " data

g++ -o ${test} ${test}.cpp -std=c++14 -fsanitize=address,undefined
g++ -o ${std} ${std}.cpp -std=c++14
g++ -o ${data} ${data}.cpp -std=c++14

num=1

while ((${num} <= 100000)); do
    ./${data}>${test}.in
    ./${test}<${test}.in>${test}.out
    ./${std}<${test}.in>${test}.ans
    if diff -w ${test}.out ${test}.ans; then
        echo AC on test ${num}
    else
        echo WA on test ${num}
        exit
    fi
    let num++
done