Tidy the site's problem pages and typeset math in explanations
The problem page's Explain and recording-review forms took most of the first screen, above the solution. They now fold into the admin bar with the editor, one open at a time; a running job is reported in the bar, so a form can be closed while it works. The problem list is grouped by month when sorted by recency, as one card per month with divided rows, laid out on a fixed grid so rows line up on a phone. Empty status tabs are hidden. Rust solutions are now highlighted, the file picker is styled like the other buttons, header links no longer break mid-word on a phone, and keyboard focus is visible. Markdown everywhere now goes through one renderer that typesets $...$, $$...$$ and ```math with KaTeX. The explanation prompt asked for $...$ only when the statement used it, so formulas came out as inline code; it now asks for LaTeX for math and code spans for code, and the review prompt does the same for complexities. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -104,7 +104,8 @@ How to explain:
|
||||
- Justify correctness informally but convincingly, especially for greedy choices.
|
||||
- If they describe what they are stuck on, or include their attempt, address that directly: say what in their attempt is on the right track and where it goes wrong. Do not rewrite their code.
|
||||
- Never give a complete solution in any real programming language. The sketch is short pseudocode for the core idea only.
|
||||
- Write in plain, direct prose. Use markdown for emphasis, lists and inline code. Use $...$ only if the problem statement does.
|
||||
- Write in plain, direct prose. Use markdown for emphasis, lists and inline code.
|
||||
- Write math as LaTeX, which the page typesets with KaTeX: $...$ inline, and $$...$$ on lines of its own for a formula worth displaying, such as a recurrence or an identity the approach rests on. That covers formulas, bounds, complexities and indexed sums (write $O(n \log n)$ and $\sum_{i=L}^{R} d_i$, not O(n log n) or Σ_{i=L..R} d[i]). Keep inline code for code: variable names, array accesses and expressions as they would appear in a program.
|
||||
|
||||
Diagram rules for each walkthrough step's svg:
|
||||
- Show the actual mechanism on a small concrete example (the sample if it is small enough): array cells with index labels and pointer arrows, grid cells with their values and the current frontier, a DP table filling in, a graph with visited nodes and the edge being relaxed, a stack or heap's contents. Successive steps should show the state changing.
|
||||
|
||||
Reference in New Issue
Block a user