Hide

Problem H
Touch The ISS

In the wake of the preparations behind uniting North America to raid Area $51$ to ”see them aliens”, another strong front of individuals teamed up to accomplish a very different objective - to build a human pyramid to invade the International Space Station.

Now everyone knows that the strategy that would use the fewest people is everyone standing one on top of another in a single (1-dimensional) tower of humans, but this isn’t realistic for obvious reasons. So instead they’re going to have to build some sort of pyramid. But a standard pyramid is also unrealistic because each level of the pyramid (starting from the top) needs more people immediately below it. So an online think tank decided to combine these two ideas, and instead has decided to build a human structure of multiple levels of pillars of humans. In words, assuming that each pillar is of equal height $s$ supported by people whose average height is $h$, and each column is supported by $u$ other columns of people of the same height, is this a possible goal?

Using the manpower you have at your disposal (the number of people who ticked ’going’ on the Facebook group - we’re going to call this number $p$), you must determine if it is feasible to reach the ISS, which is at a height $h$ from the base of the tower/pyramid.

Your objective is to do some quick math and figure out whether it is possible to touch the ISS based on the following information: number of people going, the altitude of the ISS from Earth, the average height of a person participating, the number of people per pillar of people in the modified pyramid, and the number of pillars supporting each pillar.

See the diagram for a better representation of this question. Any one of these variables could end up being a limiting factor, but all you have to do is figure out if the plan is possible given the numbers you’re given. Yes, this is a math question.

\includegraphics[width=0.7\textwidth ]{img1}

Input

The input is described as follows: Line $1$: $2$ integers $p$ and $a$ indicating the total manpower that has signed up to do this, and the altitude of the ISS ($100\, 000 \le p \le 10\, 000\, 000\, 000$ and $1\, 000 \le a \le 1\, 000\, 000$). Line $2$: a float, $h$, and $2$ integers, $s$ and $u$, indicating the average height of a person participating, the number of people per pillar, and the number of pillars supporting a given pillar ($0 < h \le 10$, $1 \le s \le p//3$, and $1 \le u \le 100$). Don’t try to hardcode this - although the ISS stays at around > $400$ km above sea level, the value of $a$ could vary as you need to test for other heights.

Output

The output should be either a single print statement. If the total number of people needed to build this pyramid to the ISS is less than the number of people you have available, print that number. If the number of people need is too great, print ’no’.

Sample Input 1 Sample Output 1
7300000000 400000
2.0 13800 2
674993201
Sample Input 2 Sample Output 2
9020781710 81000
2.0 1978323751 91
3685501

Please log in to submit a solution to this problem

Log in