-3
The code is in the image.
Statement: "Valentina is a very dedicated woman and usually works late every day. To save time, she makes the shopping list of the market in an app and usually notes down every item at the same time she notices it missing at home.
The problem is that the application does not delete duplicate items and as Valentina is distracted, notes the same item more than once and the list ends up getting extensive. Your task as a programmer and friend of Valentina is to improve the notes application by developing a code that excludes duplicate items from the shopping list and orders them alphabetically.
Entree The first line of entry contains an integer N (N < 100) that indicates the amount of test cases that follows, or rather the amount of shopping lists that Valentina wants to organize. Each purchase list consists of a single line containing 1 to 1000 items or words composed only of lower case letters (1 to 20 letters), without accents and separated by a space.
Exit The output contains N lines, each representing one of Valentina’s shopping lists, without repeating items and in alphabetical order."
The hint of the error is that it has to do with some vector that is less capable than it needs or I’m trying to access an invalid memory, but have no idea how to fix it.
Help me out, please!