Contact with the Americas revolutionized many aspects of life in Europe. Time-honoured traditions and practices that had held for centuries were dramatically changed as new materials, skills, and even vegetables and animals were sailed across the ocean and introduced into societies that had never seen change of that magnitude until then.
0.78
And the art of sailing was one which experienced such an unprecedented revolution after guinea pigs were first encountered by Europeans exploring the Andean region. On their trip back, captains realized that with an ingenious assembly of wheels, axles, and belts, they could propel their galleys in a much more efficient way than with human rowers. Guinea pigs ate in smaller quantities, grain for feeding them was easier to transport, and they were much less likely to organize mutinies that would end with the captain’s head at the end of an oar…
0.22
0.6
The system consisted of a propeller wheel, which moved the ship, together with a series of auxiliary wheels, on which guinea pigs ran to provide the propulsion force. Each wheel had an axle, where one or more transmission belts connected it to other wheels.
0.4
In their race for sailing advantage, seafarers quickly learned to identify the sturdiest and fastest of the rodents, fighting for them in auctions or even resorting to burglary in order to steal them from vessels moored at neighbouring piers. However, greed for speed remained as dangerous as it was with human propulsion: if at any point one of the pigs was pushed to run beyond their maximum natural speed, the poor animal would perish in an ear-piercing squeak of death.
Can you help these optimizing navigators determine if their furry crew will be able to propel their boat without any casualties?
Input consists of several cases. Each case starts with the number of wheels and the number of belts .
0.45 After that come lines, one for each wheel. The line for a wheel contains the name of the guinea pig that will be on it, the axle and rim radii, both between 1 and 1000, and the maximum speed, between 1 and , that the animal can run at.
0.55
The first wheel corresponds to the propeller: it will have a single
dash “-” as name, and its speed
indicates the maximum speed that the captain wants the ship to sail at.
All names are “short” and different. All radius and speed values are
integers.
Finally come pairs , with , one for each belt, which are the indices of the wheels it connects, both between 0 and . Belts are always attached to the axle of the wheels they connect, never to the rim.
For each input case, verify the linear speed of each wheel as the
propeller’s speed increases from 0 to
.
If all guinea pigs can stand their wheel’s speed, print
“Steady as she goes!”. Otherwise, print the name of the
first pig that will be crushed by the non-existent centrifugal force
followed by “ is no more.”.
There will always be at least one guinea pig moving the ship’s wheel, and there will never be two animals tied in first position. The input cases have no precission issues.
Author: Edgar Gonzalez
Event: Vint-i-quatrè Concurs de Programació de la UPC -
Semifinal
Date: 2026-06-18
Generation: 2026-06-17T18:36:15.680Z
© Jutge.org, 2006–2026.
https://jutge.org