- done/skip/undo accept unique prefixes like every other command - builds define LOCAL (-I repo root): the template includes debugging.h and enables DBG/printV only locally, so main.cpp is submittable as-is - run/build/test --debug (or USACO_DEBUG=1): ASan/UBSan + _GLIBCXX_DEBUG - list/stats date problems by git history, not mtimes reset by checkouts - template/tpl is now an alias of reset (which gains -y); fixes template dropping the STDIO line - run shows <io>.out via detect_io instead of the first *.out - debugging.h: size_t loop indices (no -Wsign-compare noise) - zsh completion for i/cat/copy; README covers test, io, reset, --debug - ignore a.out Co-Authored-By: Claude Opus 5.5 <[email protected]>
21 lines
703 B
Bash
21 lines
703 B
Bash
# usaco stats
|
|
count() { [[ -d "$1" ]] && find "$1" -mindepth 1 -maxdepth 1 -type d | wc -l || echo 0; }
|
|
solved=$(count "$ROOT/solved"); solving=$(count "$ROOT/solving"); skipped=$(count "$ROOT/skipped")
|
|
now=$(date +%s); week=0; month=0
|
|
if [[ -d "$ROOT/solved" ]]; then
|
|
for d in "$ROOT/solved"/*/; do
|
|
[[ -d "$d" ]] || continue
|
|
t="$(solved_at "${d%/}")"
|
|
[[ -z "$t" ]] && continue
|
|
age=$(( now - t ))
|
|
(( age <= 7*86400 )) && week=$((week+1))
|
|
(( age <= 30*86400 )) && month=$((month+1))
|
|
done
|
|
fi
|
|
echo "Solved: $solved"
|
|
echo "Solving: $solving"
|
|
echo "Skipped: $skipped"
|
|
echo
|
|
echo "Solved in last 7 days: $week"
|
|
echo "Solved in last 30 days: $month"
|