there are only 3\^10=59049 possible ways to distribute the dishes even before the restriction of having required numbers for dishes 1 and 2. At this size I think it would be simplest to just run through all 59049 possibilities and find the best score among those with the required number of dishes 1 and 2.

As an illustration I wrote up this quick and ugly python code

from random import randrange

score_grid = [[randrange(1,10) for j in range(3)] for i in range(10)]

for i in range(10):

print(score_grid[i])

best_score = 0

best_choice = []

for p1 in range(3):

for p2 in range(3):

for p3 in range(3):

for p4 in range(3):

for p5 in range(3):

for p6 in range(3):

for p7 in range(3):

for p8 in range(3):

for p9 in range(3):

for p10 in range(3):

choices = [p1,p2,p3,p4,p5,p6,p7,p8,p9,p10]

scores = [score_grid[i][choices[i]] for i in range(10)]

total_score = sum(scores)

d1_count = sum([1 if c==0 else 0 for c in choices])

d2_count = sum([1 if c==1 else 0 for c in choices])

if d1_count>=1 and d2_count>=3:

if total_score > best_score:

best_score = total_score

best_choice = choices

print(best_score)

print(best_choice)

This first generates a random set of scores for each person and dish. Then it runs through all the possibilities and finds the best possible score. Here is an example result

\[3, 4, 3\]

\[4, 5, 6\]

\[9, 2, 3\]

\[6, 1, 9\]

\[7, 5, 7\]

\[1, 8, 3\]

\[2, 3, 3\]

\[6, 3, 4\]

\[5, 6, 7\]

\[8, 1, 4\]

PS C:\\Users\\danie> & C:/Users/danie/AppData/Local/Programs/Python/Python310/python.exe c:/Users/danie/Downloads/great\_snakes\_35381fca29d68d8f3f25c9fa0a9026fb.py

\[2, 6, 1\]

\[3, 3, 1\]

\[5, 3, 7\]

\[6, 2, 7\]

\[1, 9, 7\]

\[1, 6, 4\]

\[9, 9, 6\]

\[4, 9, 5\]

\[8, 5, 2\]

\[2, 5, 5\]

69

\[1, 0, 2, 2, 1, 1, 0, 1, 0, 1\]

First set of 10 lists are the scores of each player and dish so \[2,6,1\] means person 1 gave scores of 2,6, and 1 to dishes 1,2, and 3 respectively.

Then 69 was the best possible score found with

\[1,0,2,2,1,0,1,0,1\] being the best possible choice of dishes for each player where 0 is dish 1, 1 is dish 2, and 2 is dish 3.