Submission #2750277
Source Code Expand
#include <stdio.h>
#include <math.h>
double max(double a, double b){
return a >= b ? a : b;
}
int main(){
double x1, y1, x2, y2, x3, y3, A, B, C, K, R = 0;
scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);
A = hypot(x1 - x2, y1 - y2);
B = hypot(x2 - x3, y2 - y3);
C = hypot(x3 - x1, y3 - y1);
// printf("(A, B, C) = (%lf, %lf, %lf)\n", A, B, C);
K = sqrt((A + B + C) / ((A + B - C) * (B + C - A) * (C + A - B)));
// printf("K = %lf\n", K);
R = max(R, A / (2 * (1 + A * K)));
R = max(R, B / (2 * (1 + B * K)));
R = max(R, C / (2 * (1 + C * K)));
printf("%.12lf\n", R);
return 0;
}
Submission Info
Submission Time
2018-06-27 21:13:41+0900
Task
B - Inscribed Bicycle
User
abc050
Language
C (GCC 5.4.1)
Score
500
Code Size
623 Byte
Status
AC
Exec Time
1 ms
Memory
384 KB
Compile Error
./Main.c: In function ‘main’:
./Main.c:10:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);
^
Judge Result
Set Name
Sample
All
Score / Max Score
0 / 0
500 / 500
Status
Set Name
Test Cases
Sample
example0.txt, example1.txt
All
000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, example0.txt, example1.txt
Case Name
Status
Exec Time
Memory
000.txt
AC
1 ms
384 KB
001.txt
AC
1 ms
128 KB
002.txt
AC
1 ms
128 KB
003.txt
AC
1 ms
128 KB
004.txt
AC
1 ms
128 KB
005.txt
AC
1 ms
128 KB
006.txt
AC
1 ms
128 KB
007.txt
AC
1 ms
128 KB
008.txt
AC
1 ms
128 KB
009.txt
AC
1 ms
128 KB
010.txt
AC
1 ms
128 KB
011.txt
AC
1 ms
128 KB
012.txt
AC
1 ms
128 KB
013.txt
AC
1 ms
128 KB
014.txt
AC
1 ms
128 KB
015.txt
AC
1 ms
128 KB
example0.txt
AC
1 ms
128 KB
example1.txt
AC
1 ms
128 KB