Ridgefield beats Greenwich, makes state tourney