Add std:: to "sort" and "reverse"