A man was slashed in the the head by a maniac with a large knife while riding the subway in Brooklyn, cops said.