SIGN: Initial framework
Implement `countSignedPermutations`
SIGN: Final solution