-
Notifications
You must be signed in to change notification settings - Fork 2
cups
bradendubois edited this page Nov 24, 2021
·
9 revisions
ID: cups
Difficulty: 1.7
CPU Time: 1 second
Memory: 1024 MB
For this, one can iterate through the cups given, and for every cup and size, store the pair in a mapping from size to color, and store the size in a list of sorts. If the first string is a digit, then divide it by two, and then store the color and value. After this, sort the sizes, and then iterate through the sorted list, outputting the corresponding color.