fork download
  1. #include <bits/stdc++.h>
  2.  
  3. //freopen("transmitters.in","r",stdin);
  4. //cout<<fixed<<setprecision(6)<<n<<endl;
  5. // transform(s.begin(), s.end(), s.begin(), ::tolower);
  6. //double PI=3.14159265359,c=0;
  7. #define ll long long
  8. //#define all(v) v.begin(),v.end()
  9. using namespace std;
  10. void fast()
  11. {
  12. std::ios_base::sync_with_stdio(0);
  13. cin.tie(0);
  14. cout.tie(0);
  15. }
  16. long long arr[10];
  17. int main ()
  18. {
  19. fast();
  20. long long n=0,t,m=0,l,s1,s2;
  21. cin>>l>>s1>>s2;
  22. double c=0;
  23. cin>>m;
  24. while(m--)
  25. {
  26. cin>>n;
  27. c=l*sqrt(2)-sqrt(n)*sqrt(2);
  28. c/=abs(s2-s1);
  29. cout<<fixed<<setprecision(5)<<c<<endl;
  30. }
  31. //system("pause");
  32. return 0;
  33. }
  34.  
Success #stdin #stdout 0s 4504KB
stdin
Standard input is empty
stdout
Standard output is empty