QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#456687#3219. ManhattanpropaneWA 0ms3876kbC++20522b2024-06-28 10:53:322024-06-28 10:53:33

Judging History

This is the latest submission verdict.

  • [2024-06-28 10:53:33]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3876kb
  • [2024-06-28 10:53:32]
  • Submitted

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'