Submission #4265861
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<P, int> P3;
const ll MOD = ll(1e9)+7;
const int IINF = INT_MAX;
const ll LLINF = LLONG_MAX;
const int MAX_N = int(1e5 + 5);
const double EPS = 1e-11;
const int di[] = {0, 1, 0, -1}, dj[] = {1, 0, -1, 0};
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define SORT(v) sort((v).begin(), (v).end())
#define ALL(v) (v).begin(), (v).end()
int main() {
double x[3], y[3], e[3], l=0.0, s, r = 0.0;
REP(i,3){
cin >> x[i] >> y[i];
}
REP(i,3){
e[i] = pow(pow(x[(i+1)%3]-x[i],2)+pow(y[(i+1)%3]-y[i],2),0.5);
l += e[i];
}
s = pow(l*(l/2-e[0])*(l/2-e[1])*(l/2-e[2])/2,0.5);
REP(i,3){
r = max(r,2*s/(l+4*s/e[i]));
cout << 2*s/(l+4*s/e[i]) << endl;
}
printf("%.10lf\n",r);
return 0;
}
Submission Info
Submission Time |
|
Task |
B - Inscribed Bicycle |
User |
NOSS |
Language |
C++14 (GCC 5.4.1) |
Score |
0 |
Code Size |
938 Byte |
Status |
WA |
Exec Time |
1 ms |
Memory |
256 KB |
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
0 / 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 |
WA |
1 ms |
256 KB |
001.txt |
WA |
1 ms |
256 KB |
002.txt |
WA |
1 ms |
256 KB |
003.txt |
WA |
1 ms |
256 KB |
004.txt |
WA |
1 ms |
256 KB |
005.txt |
WA |
1 ms |
256 KB |
006.txt |
WA |
1 ms |
256 KB |
007.txt |
WA |
1 ms |
256 KB |
008.txt |
WA |
1 ms |
256 KB |
009.txt |
WA |
1 ms |
256 KB |
010.txt |
WA |
1 ms |
256 KB |
011.txt |
WA |
1 ms |
256 KB |
012.txt |
WA |
1 ms |
256 KB |
013.txt |
WA |
1 ms |
256 KB |
014.txt |
WA |
1 ms |
256 KB |
015.txt |
WA |
1 ms |
256 KB |
example0.txt |
WA |
1 ms |
256 KB |
example1.txt |
WA |
1 ms |
256 KB |