0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-24 03:31:59 +00:00

P5671 【SWTR-02】Triangles

R52643384
This commit is contained in:
Baoshuo Ren 2021-07-08 19:51:09 +08:00 committed by Baoshuo Ren
parent caf0293b04
commit f8347749c5
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -0,0 +1,25 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
long double x, m, n;
set<long double> ans[2];
cin >> x >> m >> n;
ans[0].insert(x / 2);
ans[0].insert(x);
ans[0].insert(180 - x * 2);
ans[0].insert((180 - x) / 2);
for (auto i : ans[0]) {
if (i <= 0 || i > 180) continue;
cout << i << ' ';
}
cout << endl;
if (n != m) ans[1].insert(sqrt(pow(n, 2) - pow(m, 2)));
ans[1].insert(sqrt(pow(n, 2) + pow(m, 2)));
for (auto i : ans[1]) {
cout << fixed << setprecision(5) << i << ' ';
}
cout << endl;
return 0;
}