Tidy the usaco CLI: prefixes everywhere, LOCAL debug builds, git-based dates

- 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]>
This commit is contained in:
2026-10-14 22:39:16 +01:00
co-authored by Claude Opus 5.5
parent 1c647072c5
commit ac66ad6b03
18 changed files with 118 additions and 54 deletions
+11 -1
View File
@@ -1,5 +1,8 @@
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL // set by ./usaco builds only, so this is safe to submit as-is
#include "debugging.h"
#endif
// ----- TYPES -----
@@ -65,11 +68,18 @@ typedef vector<int> vi;
// ----- OUTPUT -----
#define YESNO(b) cout << ((b) ? "YES" : "NO") << NL
// ----- DEBUG -----
// ----- DEBUG ----- (compiled out on the judge)
#ifdef LOCAL
#define DBG(vari) cerr << #vari << " = " << (vari) << endl
#define DBG2(a, b) cerr << #a "=" << (a) << CM << #b "=" << (b) << endl
#define printA(a, L, R) FE(i, L, R) cerr << a[i] << (i == R ? '\n' : ' ')
#define printV(a) printA(a, 0, SZ(a) - 1)
#else
#define DBG(vari)
#define DBG2(a, b)
#define printA(a, L, R)
#define printV(a)
#endif
// ----- STL DS
#define ALL(c) (c).begin(), (c).end()