Separate lib, new problems and script for web

This commit is contained in:
2026-08-26 22:25:19 +01:00
parent 6fd6d70b04
commit afdab7d4bd
44 changed files with 1060 additions and 211 deletions
+12
View File
@@ -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