I call this the noduplicates mode and it is documented here
https://docs.moodle.org/35/en/Gapfill_question_type#No_Duplicates_Mode
The example I give is What are the Olympic medals, if a student answers gold,gold,gold it marks all three as correct but they only get one mark.
It would be hard for it to work with the vegetable question as there are so many possible correct answers and if it was free form rather than drag drop spolling errors would be a factor.