shoppinglist - bradendubois/competitive-programming GitHub Wiki
Shopping List
ID: shoppinglist
Difficulty: 3.2
CPU Time: 1 second
Memory: 1024 MB
Solution
For this, if we treat each line as a set of items, then what everyone buys is in the intersection of all the sets. This can be easy depending on the language used; just output the length of this intersection, sort it and print each item.