wsaleem's blog

By wsaleem, 10 hours ago, In English

Editorial for W02L02-3 - CS 334 - Spring 2025

581467A - The Lakes

We traverse the cells in the grid from left to right and top to bottom. A lake can be identified through a dfs on all cells with non0zero value. Take care to convert each visited cell to 0, so that it does not get revisited once it has been counted.. Output the maximum sum over all the lakes.

Original problem: 1829E - The Lakes, leads to official tutorial and all solutions including WS solution: 275432569

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