Submission #1611139
Source Code Expand
#include "bits/stdc++.h"
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,a,n) for(int i=a;i<n;i++)
typedef long long LL;
int main() {
int x, y, z;
cin >> x >> y >> z;
double sya = sqrt(x*x + y*y);
double e = sya - z;
double ad = x * z / sya;
double dq = y * z / sya;
double db = x - ad;
double dp = db * dq / (y + dq);
cout << fixed << setprecision(15) << ad + dp << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | D - くさかべ |
| User | DivFerinYang |
| Language | C++14 (GCC 5.4.1) |
| Score | 1 |
| Code Size | 423 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 256 KiB |
Judge Result
| Set Name | sample | all | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 1 / 1 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| sample | sample-01.txt, sample-02.txt |
| all | sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, sample-01.txt, sample-02.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01-01.txt | AC | 1 ms | 256 KiB |
| 01-02.txt | AC | 1 ms | 256 KiB |
| 01-03.txt | AC | 1 ms | 256 KiB |
| 01-04.txt | AC | 1 ms | 256 KiB |
| 01-05.txt | AC | 1 ms | 256 KiB |
| 01-06.txt | AC | 1 ms | 256 KiB |
| 01-07.txt | AC | 1 ms | 256 KiB |
| 01-08.txt | AC | 1 ms | 256 KiB |
| 01-09.txt | AC | 1 ms | 256 KiB |
| 01-10.txt | AC | 1 ms | 256 KiB |
| sample-01.txt | AC | 1 ms | 256 KiB |
| sample-02.txt | AC | 1 ms | 256 KiB |