Skip to content

Commit ff3661c

Browse files
upd
1 parent b636eb8 commit ff3661c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

solutions/gold/cses-1148.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ i.e. how much it can expand above and below line $i$ maintaing width $r_{i, j}$.
2020

2121
We'll do difference arrays on each column independently.
2222
Accordingly, the updates of the answer matrix look like this:
23-
- $ans[1][r_{i,j}]++$
24-
- $ans[i - u_{i, j} + 2][r_{i,j}]--$ , the upperbound
25-
- $ans[d_{i,j} - i + 2][r_{i, j}]]--$ , the lowerbound
26-
- $ans[d_{i,j} - u_{i,j} + 3][r_{i,j}]++$
23+
- $\texttt{ans}[1][r_{i,j}]++$
24+
- $\texttt{ans}[i - u_{i, j} + 2][r_{i,j}]--$ , the upperbound
25+
- $\texttt{ans}[d_{i,j} - i + 2][r_{i, j}]]--$ , the lowerbound
26+
- $\texttt{ans}[d_{i,j} - u_{i,j} + 3][r_{i,j}]++$
2727

2828
Finally, we add $ans[i][j]$ to $ans[i][j-1]$ i.e. a submatrix of size
2929
$i \times j$ contains a submatrix of size $i \times (j-1)$.

0 commit comments

Comments
 (0)