3546. Equal Sum Grid Partition I
This commit is contained in:
29
3546. Equal Sum Grid Partition I/Program.cs
Normal file
29
3546. Equal Sum Grid Partition I/Program.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
var sol = new Solution();
|
||||
|
||||
var cases = new (int[][] grid, bool expected, string name)[]
|
||||
{
|
||||
(
|
||||
new[]
|
||||
{
|
||||
new[] { 1, 4 },
|
||||
new[] { 2, 3 }
|
||||
},
|
||||
true,
|
||||
"Example 1"
|
||||
),
|
||||
(
|
||||
new[]
|
||||
{
|
||||
new[] { 1, 3 },
|
||||
new[] { 2, 4 }
|
||||
},
|
||||
false,
|
||||
"Example 2"
|
||||
)
|
||||
};
|
||||
|
||||
foreach (var (grid, expected, name) in cases)
|
||||
{
|
||||
var actual = sol.CanPartitionGrid(grid);
|
||||
Console.WriteLine($"{name}: {actual} (expected: {expected})");
|
||||
}
|
||||
Reference in New Issue
Block a user