This commit is contained in:
Electrominch
2022-10-12 02:30:23 +03:00
parent 02afed9c4c
commit 01c5720116
39 changed files with 517 additions and 30 deletions

View File

@@ -4,7 +4,7 @@ internal class Program
{
static void Main(string[] args)
{
int[][] matrix = {new int[] {0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},new int[] {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0},new int[] {0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0},new int[] {0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0},new int[] {0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0},new int[] {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},new int[] {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0},new int[] {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0}};
int[][] matrix = { new int[] { 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }, new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0 }, new int[] { 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0 }, new int[] { 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0 }, new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0 }, new int[] { 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0 } };
Console.WriteLine(new Solution().MaxAreaOfIsland(matrix));
}
}