BEAF/BAN linear array solver

Always remove trailing 1's

Auto-evaluate when second entry is 1