From heaven to earth
All submissions for this problem are available.
Read problems statements in mandarin chinese, russian and vietnamese as well.
Chef has been working in a restaurant which has N floors. He wants to minimize the time it takes him to go from the N-th floor to ground floor. He can either take the elevator or the stairs.
The stairs are at an angle of 45 degrees and Chef's velocity is V1 m/s when taking the stairs down. The elevator on the other hand moves with a velocity V2 m/s. Whenever an elevator is called, it always starts from ground floor and goes to N-th floor where it collects Chef (collecting takes no time), it then makes its way down to the ground floor with Chef in it.The elevator cross a total distance equal to N meters when going from N-th floor to ground floor or vice versa, while the length of the stairs is sqrt(2) * N because the stairs is at angle 45 degrees.
Chef has enlisted your help to decide whether he should use stairs or the elevator to minimize his travel time. Can you help him out?
The first line contains a single integer T, the number of test cases. Each test case is described by a single line containing three space-separated integers N, V1, V2.
For each test case, output a single line with string Elevator or Stairs, denoting the answer to the problem.
- 1 ≤ T ≤ 1000
- 1 ≤ N, V1, V2 ≤ 100
Input: 3 5 10 15 2 10 14 7 14 10 Output: Elevator Stairs Stairs
|Tags||cakewalk, cook85, math, melnik|
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||ADA, ASM, BASH, BF, C, C99 strict, CAML, CLOJ, CLPS, CPP 4.3.2, CPP 6.3, CPP14, CS2, D, ERL, FORT, FS, GO, HASK, ICK, ICON, JAVA, JS, kotlin, LISP clisp, LISP sbcl, LUA, NEM, NICE, NODEJS, PAS fpc, PAS gpc, PERL, PERL6, PHP, PIKE, PRLG, PYPY, PYTH, PYTH 3.5, RUBY, rust, SCALA, SCM chicken, SCM guile, SCM qobi, ST, swift, TCL, TEXT, WSPC|
Fetching successful submissions
If you are still having problems, see a sample solution here.