Skip to content

peasoup

bradendubois edited this page Jul 18, 2021 · 9 revisions

Pea Soup and Pancakes

ID: peasoup

Difficulty: 2.4

CPU Time: 1 second

Memory: 1024 MB

Solution

For every case, read the restaurant name and store it, and read every of the k items into a menu (perhaps a map). After reading all the items, if you have seen both "pea soup" and "pancakes", output the name and terminate, otherwise, after seeing every restaurant, output "Anywhere is fine I guess".

Clone this wiki locally