Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- typedef long long LL;
- typedef long double ld;
- LL v,t,k;
- const LL Re=6400000;
- /*
- v is the velocity of the ship
- t the expected arrival time
- k the hight of the tower / mountain
- Re is the Earth radius
- All units are in SI
- */
- int main()
- {
- cin>>v>>t>>k;
- ld theta =acos(Re*1.0/(Re*1.0 + k));
- ld dis=Re*theta;
- if(dis>v*t)puts("YES");
- else puts("NO");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement