|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|1 초||256 MB||7||7||7||100.000%|
The University of Lagado is organising events for the upcoming Fresher’s week and has been told — much to the surprise of its staff — that some of the undergraduates may enjoy a beer tasting. While sourcing a wide variety of drinks for the students to taste, the university realised that in the interests of safety there should be a limit on the alcohol consumption of any student, enforced by a strict limit on the amount any individual is allowed to spend.
In common with many popular establishments, the drinks with varying strengths are served in varying amounts: Either a litre, a half litre or a third of a litre to limit possible intoxication.
The students are looking forward to the event, but in order to make the most of their money and still be bright-eyed and bushy tailed for the first week of morning lectures, they don’t wish to get too drunk. How can the students spend all their money and consume in full their self-imposed alcohol limit for the night?
Name, strength, price and cost will be separated by spaces
If the students’ aims are possible, write one or more lines, each listing the name of the drink purchased followed by the positive integer count of how many drinks of that type were bought. If there are several solutions, output any.
Otherwise, output a single line containing the word IMPOSSIBLE.
10.00 9.0 2 fire 2 1/1 4.00 water 10 1/2 2.00
fire 2 water 1
2.00 3.0 3 firewater 1 1/1 1.00 windwater 1 1/1 1.00 earthwater 1 1/1 1.00