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:
parent
caf0293b04
commit
f8347749c5
25
Luogu/problem/P5671/P5671.cpp
Normal file
25
Luogu/problem/P5671/P5671.cpp
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user