Thank all of you for your contributions to my question. You are all very helpful and I am glad that this forum exist.
Special thanks to Anton, who took the effort to write a complete algorithm to my problem. Thank you very much. I am also supriesed that my little questions turns out in such a big algorithm. I completely underestimated it.
I am still trying to understand the algorithm but there is one question that I already have:
Did you forget to define eachTeamHadFullMeal ? I think so. This is why I can not evaluate the Matrix plot.
I will have following questions, but I will keep this for the beginning. I don't want to confuse you :-)
Regards,
Peter