結果
問題 | No.760 Where am I moved to? |
ユーザー |
![]() |
提出日時 | 2018-12-09 03:51:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 535 bytes |
コンパイル時間 | 540 ms |
コンパイル使用メモリ | 74,116 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-25 05:40:30 |
合計ジャッジ時間 | 6,091 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include <cstdio> #include <complex> #include <cmath> using namespace std; int main() { double rat = acos(-1.0) / 180; double xx,xy,d; double ax,ay,bx,by; double Ax,Ay,Bx,By; scanf ("%lf %lf %lf",&xx,&xy,&d); scanf ("%lf %lf %lf %lf",&ax,&ay,&bx,&by); scanf ("%lf %lf %lf %lf",&Ax,&Ay,&Bx,&By); complex<double> X(xx,xy),R=polar(1.,rat*d),a(ax,ay),b(bx,by),A(Ax,Ay),B(Bx,By); auto x = (a * (B - X) + (X - A) * b) / (B - A); auto r = (a - x) / (A - X) * R; printf ("%lf %lf %lf\n",x.real(),x.imag(),arg(r)/rat); return 0; }