2 3 3 1 2 2 4 2 1 1 1 2
Case #1: 0.5000000000 Case #2: 0.4000000000 Hint The first test case is the sample in the problem. In the second test case, the best lottery program is: Assume groups are A(1), B(1), C(1), D(2), For [0, 0.2) persons in A, B are the winners. For [0.2, 0.4) persons in B, C are the winners. For [0.4, 0.6) persons in A, C are the winners. For [0.6, 1) persons in D are the winners.