fork download
  1. #include<iostream>
  2. #include<math.h>
  3. using namespace std;
  4. int main()
  5. {
  6. int t;
  7. cin>>t;
  8. while(t--)
  9. {
  10. float n,v1,v2;
  11. float t1,t2;
  12. cin>>n>>v1>>v2;
  13. t1=(float)(sqrt(2)*n)/v1;
  14. t2=2*(float)(n)/v2;
  15. if(t1<t2)
  16. cout<<"Stairs"<<endl;
  17. else
  18. cout<<"Elevator"<<endl;
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 4500KB
stdin
3
5 10 15
2 10 14
7 14 10
stdout
Elevator
Stairs
Stairs