Жишээ тэстүүд

Оролт
4 5
75 5
0 100
150 20
75 1
Гаралт
100
Оролт
5 100
0 7
11 32
99 10
46 8
87 54
Гаралт
111

Тэмдэглэл

In the first sample test the most profitable strategy is to form a company from only the second friend. At all other variants the total degree of friendship will be worse.

In the second sample test we can take all the friends.