QOJ.ac
QOJ
QOJ is currently under a maintenance. It might be unavailable in the following a few hours.
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#189939 | #3219. Manhattan | KKT89 | AC ✓ | 0ms | 4040kb | C++17 | 732b | 2023-09-28 01:39:32 | 2023-09-28 01:39:32 |
Judging History
answer
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <cstdio>
#include <ctime>
#include <assert.h>
#include <chrono>
#include <random>
#include <numeric>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
using namespace std;
typedef long long int ll;
typedef unsigned long long ull;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
return (ull)rng() % B;
}
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
double d; cin >> d;
printf("%.9f\n",max((double)((int)d+1),sqrt(2)*d) );
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3924kb
input:
1.414
output:
2.000000000
result:
ok found '2.000000000', expected '2.000000000', error '0.000000000'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3928kb
input:
1.415
output:
2.001112191
result:
ok found '2.001112191', expected '2.001112191', error '0.000000000'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3968kb
input:
2.002
output:
3.000000000
result:
ok found '3.000000000', expected '3.000000000', error '0.000000000'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3964kb
input:
2.235
output:
3.160767312
result:
ok found '3.160767312', expected '3.160767312', error '0.000000000'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3964kb
input:
10.000
output:
14.142135624
result:
ok found '14.142135624', expected '14.142135624', error '0.000000000'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3964kb
input:
1.625
output:
2.298097039
result:
ok found '2.298097039', expected '2.298097039', error '0.000000000'
Test #7:
score: 0
Accepted
time: 0ms
memory: 4020kb
input:
0.996
output:
1.408556708
result:
ok found '1.408556708', expected '1.408556708', error '0.000000000'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3968kb
input:
1.313
output:
2.000000000
result:
ok found '2.000000000', expected '2.000000000', error '0.000000000'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3964kb
input:
2.107
output:
3.000000000
result:
ok found '3.000000000', expected '3.000000000', error '0.000000000'
Test #10:
score: 0
Accepted
time: 0ms
memory: 4040kb
input:
0.802
output:
1.134199277
result:
ok found '1.134199277', expected '1.134199277', error '0.000000000'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
4.581
output:
6.478512329
result:
ok found '6.478512329', expected '6.478512329', error '0.000000000'
Test #12:
score: 0
Accepted
time: 0ms
memory: 4032kb
input:
9.172
output:
12.971166794
result:
ok found '12.971166794', expected '12.971166794', error '0.000000000'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3928kb
input:
5.039
output:
7.126222141
result:
ok found '7.126222141', expected '7.126222141', error '0.000000000'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3928kb
input:
3.845
output:
5.437651147
result:
ok found '5.437651147', expected '5.437651147', error '0.000000000'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3980kb
input:
2.605
output:
3.684026330
result:
ok found '3.684026330', expected '3.684026330', error '0.000000000'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3788kb
input:
1.000
output:
2.000000000
result:
ok found '2.000000000', expected '2.000000000', error '0.000000000'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3968kb
input:
2.345
output:
3.316330804
result:
ok found '3.316330804', expected '3.316330804', error '0.000000000'