seige of masada problem algo implemented. algo works for the defined conditions. Not for custom settings.