QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#117902#3219. Manhattani_am_noob#AC ✓1ms3708kbC++14423b2023-07-02 13:56:132023-07-02 13:56:15

Judging History

This is the latest submission verdict.

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-07-02 13:56:15]
  • Judged
  • Verdict: AC
  • Time: 1ms
  • Memory: 3708kb
  • [2023-07-02 13:56:13]
  • Submitted

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define pii pair<int, int>
#define all(a) a.begin(), a.end()
#define sz(a) ((int)a.size())
const int mod = 998244353, N = 300005;

int main() {
    ios::sync_with_stdio(false), cin.tie(0);
    double x; cin >> x;
    int y=x*1000+0.5;
    cout << fixed << setprecision(15) << max(x*sqrt(2),(double)(y/1000+1)) << "\n";
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3660kb

input:

1.414

output:

2.000000000000000

result:

ok found '2.000000000', expected '2.000000000', error '0.000000000'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

1.415

output:

2.001112190757930

result:

ok found '2.001112191', expected '2.001112191', error '0.000000000'

Test #3:

score: 0
Accepted
time: 1ms
memory: 3576kb

input:

2.002

output:

3.000000000000000

result:

ok found '3.000000000', expected '3.000000000', error '0.000000000'

Test #4:

score: 0
Accepted
time: 1ms
memory: 3680kb

input:

2.235

output:

3.160767311903868

result:

ok found '3.160767312', expected '3.160767312', error '0.000000000'

Test #5:

score: 0
Accepted
time: 1ms
memory: 3628kb

input:

10.000

output:

14.142135623730951

result:

ok found '14.142135624', expected '14.142135624', error '0.000000000'

Test #6:

score: 0
Accepted
time: 1ms
memory: 3648kb

input:

1.625

output:

2.298097038856280

result:

ok found '2.298097039', expected '2.298097039', error '0.000000000'

Test #7:

score: 0
Accepted
time: 1ms
memory: 3708kb

input:

0.996

output:

1.408556708123603

result:

ok found '1.408556708', expected '1.408556708', error '0.000000000'

Test #8:

score: 0
Accepted
time: 1ms
memory: 3704kb

input:

1.313

output:

2.000000000000000

result:

ok found '2.000000000', expected '2.000000000', error '0.000000000'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

2.107

output:

3.000000000000000

result:

ok found '3.000000000', expected '3.000000000', error '0.000000000'

Test #10:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

0.802

output:

1.134199277023222

result:

ok found '1.134199277', expected '1.134199277', error '0.000000000'

Test #11:

score: 0
Accepted
time: 1ms
memory: 3664kb

input:

4.581

output:

6.478512329231149

result:

ok found '6.478512329', expected '6.478512329', error '0.000000000'

Test #12:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

9.172

output:

12.971166794086029

result:

ok found '12.971166794', expected '12.971166794', error '0.000000000'

Test #13:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

5.039

output:

7.126222140798026

result:

ok found '7.126222141', expected '7.126222141', error '0.000000000'

Test #14:

score: 0
Accepted
time: 1ms
memory: 3628kb

input:

3.845

output:

5.437651147324551

result:

ok found '5.437651147', expected '5.437651147', error '0.000000000'

Test #15:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

2.605

output:

3.684026329981913

result:

ok found '3.684026330', expected '3.684026330', error '0.000000000'

Test #16:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

1.000

output:

2.000000000000000

result:

ok found '2.000000000', expected '2.000000000', error '0.000000000'

Test #17:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

2.345

output:

3.316330803764908

result:

ok found '3.316330804', expected '3.316330804', error '0.000000000'