sohel wrote:shouldn't the unit of weight be Newton.
w should be mass in kilograms..
.. there is major difference between mass and weight.
I think we will only distinguish mass and weight carefully in Physics class. At the rest of the time, we will use kilogram instead of Newton as the unit of weight.
cho wrote:
I think we will only distinguish mass and weight carefully in Physics class. At the rest of the time, we will use kilogram instead of Newton as the unit of weight.
But since this is a physics problem and we have to handle g and m, I think the differentiation should have been mentioned.
I just finished this question, but I don't like that so much:
1. It requires too much physics knowledge, at least to me. I need to search the formula of spring energy to solve it. (I have learned that before but forget it for long time)
2. Under the problem statement, the body weight w may be zero. In such case it is impossible to determine the speed of James Bond, although the judge data doesn't contain such case....
My signature:
Please make discussion about the algorithm BRFORE posting source code.
We can learn much more in discussion than reading source code.
mf wrote:
The problem can be also solved by simulation. The physics you'd need for this is pretty elementary.
Simulation...Do you mean simutle the Bungee Jumping by small time interval continously??? I think it is too dangerous to consider the precision.
For your view, that is pretty elementary. But for someone who don't have much physics knowledge, that's not. That's why in the ACMICPC, the problems will not require any special knowledge in background other than Computer Science/Maths... Just express the feeling, not to criticize anyone..
My signature:
Please make discussion about the algorithm BRFORE posting source code.
We can learn much more in discussion than reading source code.
.. wrote:Simulation...Do you mean simutle the Bungee Jumping by small time interval continously??? I think it is too dangerous to consider the precision.
Well, yeah. I got some WA's at first. But this approach works. My accepted program uses time intervals of 0.0001 sec.
.. wrote:For your view, that is pretty elementary.
I only mean that one can make simulation using just basic high-school formulas, like: F=m*a, s=v*t, v=a*t, etc.
I didn't need any complex formulas and theories to make a working program.
What conservation of energy do you mean and how do you use it to solve the problem? I have been thinking the following way:
Bond will reach its downmost position when the force pulling him up becomes equal to the force pulling him down:
w*9.81 = k*dl
Thus, we determine dl - how much the rope is expanded beyond its nominal length. For all sample data it turns out that dl is just too small to reach the ground.
James Bond reaches his minimum height when his potential energy is completely transfered into the potential energy of the string. i.e. wgx=0.5*k*x^2. Then you will know if he will stuck in the air by comparing L+x and s.
If he can reach the ground, his loss in potential energy will equal the sum of his kinetic energy and the potential energy in the string.
However, the possibly-zero parameters do make me feel confused. I think you can assume w is always positive. Otherwise, his speed would be undefined.
I have a question. According to your formula, the x will be 2wg/k, i.e. the x for the first set of data in the problem will be about 4.2, which is less then the difference between 20 and 30 and we will get the answer as stucking in the air. I think Bond jumps from the top to the lowest height. The loss of gravitational potential energy will be turn into the potential energy of elasticity. In other words, we'll get the formula wg(l+dl)=0.5*k*(dl)^2. Of course the formula is wrong for I can't get right answers with this. Could any 'physicist' solve this?
Oops.. it should be wg(L+x)=0.5*k*x^2
Oops.. it's a quadratic equation..
Just checked with my code, I actually use a slightly different formula to check if he can reach the ground (in order to avoid solving this quadratic equation).
If his potential difference between the bridge and the ground is less than the kinetic energy in the string when it is extended to the ground, he will stuck in the air. i.e. mgs < 0.5*k*(s-L)^2