版本比较
NOI Linux 常用 Bash 指令
正文
增加 14 行删除 10 行
44 行未改动45464748495051525354555657585960616263646566676844 行未改动自动对拍脚本:```shset -ec generator.cppc std.cppc sol.cppfor ((i=1; i<=100000; i++)); do./generator "$i"if ! timeout 2s ./std; thenecho "Test $i: std RE/TLE!"exit 1fiif ! timeout 2s ./sol; thenecho "Test $i: sol RE/TLE!"exit 1fiif ! diff -w -q .ans .out > /dev/null; thenecho "Test $i: Wrong Answer!"exit 1fidoneecho "Accpet!"```44 行未改动4546474849505152535455565758596061626364656667686970717244 行未改动自动对拍脚本:```shset -en=5000g++ -std=c++14 -O2 gen.cpp -o geng++ -std=c++14 -O2 std.cpp -o stdg++ -std=c++14 -O2 sol.cpp -o solfor ((i=1; i<=n; i++)); do./gen $iif ! timeout 2s ./std; thenecho "Test $i: std RE/TLE"exit 1fiif ! timeout 2s ./sol; thenecho "Test $i: sol RE/TLE"exit 1fiif ! diff -w .ans .out > /dev/null; thenecho "Test $i: Wrong answer"exit 1fiif ((i % (n / 10) == 0)); thenecho "Passed $i tests";fidoneecho "Accept"```