Submission #00378


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include<bits/stdc++.h>
using namespace std;
double x[100000];
double r[100000];
int main(){
int n;
cin >> n;
for(int i=0;i<n;i++){
cin >> x[i] >> r[i];
}
double maxx = -1;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
if(i != j){
if(x[i] - r[i] < x[j] + r[j]){
double cen = ((x[i]-r[i]) + (x[j]+r[j])) / 2.0;
maxx = max(maxx,sqrt( r[i] * r[i] - (x[i] - cen) * (x[i] - cen) ));
}
}
}
}
cout << maxx << endl;
}

ステータス

項目 データ
問題 0009 - ヒバラ海に沈む遺跡
ユーザー名 椅子男
投稿日時 2016-08-29 11:57:07
言語 C++11
状態 Wrong Answer
得点 0
ソースコード長 483 Byte
最大実行時間 5000 ms
最大メモリ使用量 2268 KB

セット

セット 得点 Cases
1 ALL 0 / 16 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
00-sample1.in AC 21 ms 472 KB
1
00-sample2.in WA 16 ms 448 KB
1
00-sample3.in WA 20 ms 548 KB
1
01_shift1.in TLE 5000 ms 2052 KB
1
01_shift10.in TLE 5000 ms 2016 KB
1
01_small_00.in WA 17 ms 568 KB
1
01_small_01.in WA 23 ms 672 KB
1
02_single1.in WA 18 ms 648 KB
1
02_single2.in WA 23 ms 624 KB
1
02_single3.in WA 24 ms 600 KB
1
10_common1.in TLE 5000 ms 2096 KB
1
10_common2.in TLE 5000 ms 2184 KB
1
20_small_area1.in TLE 5000 ms 2268 KB
1
20_small_area2.in TLE 5000 ms 2228 KB
1
30_nest_center.in TLE 5000 ms 2184 KB
1
30_nest_left.in TLE 5000 ms 2144 KB
1
30_nest_right.in TLE 5000 ms 2100 KB
1
100_rand_00.in WA 17 ms 580 KB
1
100_rand_01.in WA 18 ms 420 KB
1
100_rand_02.in WA 25 ms 400 KB
1
100_rand_03.in WA 19 ms 628 KB
1
100_rand_04.in WA 19 ms 604 KB
1
100_rand_05.in WA 16 ms 448 KB
1
100_rand_06.in WA 16 ms 424 KB
1
100_rand_07.in WA 17 ms 524 KB
1
100_rand_08.in WA 21 ms 500 KB
1
100_rand_09.in WA 23 ms 468 KB
1
100_rand_10.in WA 14 ms 572 KB
1
101_largerand_00.in WA 29 ms 552 KB
1
101_largerand_01.in WA 59 ms 636 KB
1
101_largerand_02.in WA 97 ms 704 KB
1
101_largerand_03.in WA 152 ms 756 KB
1
101_largerand_04.in WA 224 ms 668 KB
1