raghavmangla04's blog

By raghavmangla04, history, 15 months ago, In English

Here is the link to the problem: https://atcoder.jp/contests/abc311/tasks/abc311_f

Problem Statement basically states that there is a grid of characters of size n*m if grid[i][j]=='.' that means square(i,j) is white if grid[i][j]=='#' that means square(i,j) is black

necessary condition for grid to be beautiful is that if square (i,j) is black , square (i+1,j) and square(i+1,j+1) should also be black

we can repaint a white cell to a black cell, and were asked to find the number of beautiful grids possible

I wanted to ask about the dp solution of this problem using memoization instead of tabulation, like what exactly the transitions would be in memoized solution (Pls ignore grammatical errors)

Tags dp
  • Vote: I like it
  • 0
  • Vote: I do not like it