Separate lib, new problems and script for web
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# usaco run <name>
|
||||
[[ $# -ge 1 ]] || usage
|
||||
dir="$(find_problem "$1")"
|
||||
build_problem "$dir"
|
||||
# run from inside the dir so freopen finds the .in file
|
||||
(cd "$dir" && ./main)
|
||||
# show the .out file if the program wrote one
|
||||
out="$(ls "$dir"/*.out 2>/dev/null | grep -v '/a\.out$' | head -1 || true)"
|
||||
if [[ -n "$out" ]]; then
|
||||
echo "── $(basename "$out") ──"
|
||||
cat "$out"
|
||||
fi
|
||||
Reference in New Issue
Block a user