4th Balkan Olympiad in Informatics
Nicosia, Cyprus, 19-25 October 1997


Day 1 - Problem 1 (Compatible fishes)



If you want to create an aquarium with exotic fish you must take the advise of an expert in order to avoid a situation in which a certain type of fish can not coexist and live together with another fish type. The reason is the "incompatibility" among fish types.

Given the number of fish types and the available amount of money for spending, find the maximum number of fish types. For this number of fish types find the maximum amount of money that can be spent, provided that only one fish per type is used.