Problem Statement | |||||||||||||
A doll vendor has just received a shipment of dolls from the factory. Their sizes are given in the int[] dollSizes. The vendor can only sell dolls in sets of two such that one doll is K times as large as the other. What is the maximum number of sets that the vendor can assemble? Each doll can only be used in a single set. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | dollSizes will contain between 1 and 50 elements, inclusive. | ||||||||||||
- | Each element in dollSizes will be between 1 and 1000000, inclusive. | ||||||||||||
- | K will be between 1 and 25, inclusive | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
| |||||||||||||
4) | |||||||||||||
| |||||||||||||
5) | |||||||||||||
|