fixed day 7

This commit is contained in:
2024-12-12 14:36:46 -05:00
parent 323f6051f5
commit d2eec1fef5

View File

@@ -38,7 +38,7 @@ internal class BridgeRepair : Problem<ulong, ulong>
private static bool IsSolvable(ulong target, ulong[] nums, Operator curOperator, ulong curTotal, Operator[] ops, int idx = 1)
{
if (target == curTotal)
if (target == curTotal && idx == nums.Length)
return true;
if (curTotal > target)
return false;