QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#456687 | #3219. Manhattan | propane | WA | 0ms | 3876kb | C++20 | 522b | 2024-06-28 10:53:32 | 2024-06-28 10:53:33 |
Judging History
answer
#include<iostream>
#include<cstring>
#include<vector>
#include<numbers>
#include<iomanip>
#include<cmath>
using namespace std;
using LL = long long;
int main(){
#ifdef LOCAL
freopen("data.in", "r", stdin);
freopen("data.out", "w", stdout);
#endif
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(0);
double x;
cin >> x;
double ans = x * numbers::sqrt2;
if (x >= 1.0) ans = max(ans, int(sqrt(x)) + 1.0);
cout << fixed << setprecision(20) << ans << '\n';
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3728kb
input:
1.414
output:
2.00000000000000000000
result:
ok found '2.000000000', expected '2.000000000', error '0.000000000'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3876kb
input:
1.415
output:
2.00111219075792989841
result:
ok found '2.001112191', expected '2.001112191', error '0.000000000'
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3804kb
input:
2.002
output:
2.83125555187093613796
result:
wrong answer 1st numbers differ - expected: '3.0000000', found: '2.8312556', error = '0.0562481'