Use vectors to solve problems