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
+19
View File
@@ -0,0 +1,19 @@
# usaco list
list_by_mtime() { # list subdirs of $1 oldest-first by last modification
[[ -d "$1" ]] || return 0
for d in "$1"/*/; do
[[ -d "$d" ]] || continue
# newest mtime of any file in the problem dir
printf '%s\t%s\n' "$(find "$d" -type f -printf '%T@\n' | sort -n | tail -1)" "$(basename "$d")"
done | sort -n | cut -f2 | sed 's/^/ /'
}
echo "== Solving =="
list_by_mtime "$ROOT/solving"
echo
echo "== Solved =="
list_by_mtime "$ROOT/solved"
if [[ -d "$ROOT/skipped" && -n "$(ls -A "$ROOT/skipped" 2>/dev/null)" ]]; then
echo
echo "== Skipped =="
list_by_mtime "$ROOT/skipped"
fi