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
+11
View File
@@ -0,0 +1,11 @@
# usaco done <name>
[[ $# -ge 1 ]] || usage
name="$1"
[[ -d "$ROOT/solving/$name" ]] || { echo "Error: solving/$name not found" >&2; exit 1; }
[[ -d "$ROOT/solved/$name" ]] && { echo "Error: solved/$name already exists" >&2; exit 1; }
mv "$ROOT/solving/$name" "$ROOT/solved/$name"
echo "Moved to solved/$name 🎉"
if git -C "$ROOT" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
git -C "$ROOT" add -A "solved/$name" "solving/$name" 2>/dev/null || true
git -C "$ROOT" commit -m "Solve $name" >/dev/null && echo "Committed: Solve $name"
fi