Code: Select all
1 2
1
1 1
1 1
2
2
0 0
Moderator: Board moderators
Code: Select all
1 2
1
1 1
1 1
2
2
0 0
So I tested them with the following test case:1.sort the team based on number of members in decreasing order
2.then assign team members of a team to each table considering the capacity limit of each table. and do same for the next team....
3.if a member of one team can't be assigned to any table due to table capacity try for the next.
4.repeat this process...until all team members are assigned.
now,
if all person can be placed then print the configuration,
else output "0"
Code: Select all
4 5
5 4 3 3
3 3 3 4 5
0 0
Code: Select all
1
1 2 3 4 5
2 3 4 5
1 2 3
1 4 5