QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#384631 | #4497. Map | Tobo# | AC ✓ | 242ms | 3752kb | C++20 | 577b | 2024-04-10 08:12:07 | 2024-04-10 08:12:08 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
signed main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while (t--)
{
vector<double> c(16);
for (double &i : c)
cin >> i;
complex A(c[0], c[1]), B(c[2], c[3]);
complex a(c[8], c[9]), b(c[10], c[11]);
auto h = (A * b - B * a) / (b - a);
auto k = (A - h) / a;
auto x = h / (complex(1.0, 0.0) - k);
cout << fixed << setprecision(7) << x.real() << ' ' << x.imag() << '\n';
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 242ms
memory: 3752kb
input:
100000 0 5 15 5 15 0 0 0 3 2 9 5 10 3 4 0 -605 604 604 605 605 -604 -604 -605 569 -338 568 -337 569 -336 570 -337 -964 963 963 964 964 -963 -963 -964 -364 838 -365 839 -364 840 -363 839 -664 663 663 664 664 -663 -663 -664 -307 -424 -308 -423 -307 -422 -306 -423 -866 865 865 866 866 -865 -865 -866 12...
output:
6.0000000 2.0000000 568.8082645 -336.2512397 -364.2463693 838.3760373 -306.4503012 -422.9126506 119.4705543 796.6091224 426.6965649 50.2398219 -138.7016575 -400.8552486 190.8919118 -43.8272059 -392.4260231 -700.8384050 96.5101764 624.6417910 576.2781690 448.0908451 -93.0586817 165.7918006 95.1487252...
result:
ok 200000 numbers