QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#181067 | #5677. Clarissa's Conical Cannolis | Yshanqian | WA | 0ms | 4140kb | C++14 | 827b | 2023-09-16 15:32:55 | 2023-09-16 15:32:55 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ios ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define int long long
#define ULL unsigned long long
#define endl "\n"
#define pi acos(-1)
typedef pair<int, int> PII;
typedef pair<int, PII> PIII;
const int N = 1e6 + 10, M = 1010, INF = 0x3f3f3f3f, mod = 998244353;
void solve()
{
double d, s, r, o;
cin >> d >> s >> r >> o;
double A = d * pi / s; // 扇形的角
if (r-(s - r) * sin(A / 2) < o / 2)
cout << "-1.0" << endl;
else if (r - (r * sin(A / 2)) < o / 2)
cout << "-2.0" << endl;
else
{
double x = (r - o / 2) / sin(A / 2);
printf("%.1lf\n", s - x - r);
}
}
signed main()
{
ios;
int T = 1;
// cin >> T;
while (T--)
solve();
return 0;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 4140kb
input:
8.00 12.00 5.00 0.50
output:
-1.0
result:
wrong answer 1st lines differ - expected: '1.5', found: '-1.0'