Skip to content

Commit dce2a5f

Browse files
committed
atcoder/abc144D
1 parent a061c36 commit dce2a5f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

atcoder/abc144/D/main.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include <bits/stdc++.h>
2+
3+
using namespace std;
4+
using ll = int64_t;
5+
using ff = long double;
6+
7+
int main() {
8+
ios_base::sync_with_stdio(false);
9+
cin.tie(0); cout.tie(0);
10+
11+
int a, b, x;
12+
cin >> a >> b >> x;
13+
ff theta;
14+
if (2 * x >= a * a * b) {
15+
theta = atan2(2 * a * a * b - 2 * x, a * a * a);
16+
} else {
17+
theta = M_PI / ff(2.0) - atan2(2 * x, a * b * b);
18+
}
19+
theta = theta * ff(180) / M_PI;
20+
cout << fixed << setprecision(7) << theta << endl;
21+
22+
return 0;
23+
}

0 commit comments

Comments
 (0)