Graph on a Table
You are given a table with $N$ rows and $M$ columns. Let's denote the cell in row $r$ and column $c$ by $(r, c)$. You are also given $Q$ rectangles in this table. Consider a directed acyclic graph such that each vertex corresponds to a cell of the table (so there are $N \cdot M$ vertices) and there is an edge from cell $(r_1, c_1)$ to cell $(r_2, c_2)$ if and only if: - $r_1 < r_2, c_1 < c_2$ - t
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start