Submission #1611255
Source Code Expand
#include "bits/stdc++.h"
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
using namespace std;
int main(){
int x,y,z;
cin>>x>>y>>z;
double p1 = z*x/sqrt(x*x+y*y);
double p2 = z*y/sqrt(x*x+y*y);
printf( "%.20lf\n",( p2*(x-p1) ) / ( y+p2 ) + p1 );
}
Submission Info
| Submission Time | |
|---|---|
| Task | D - くさかべ |
| User | tanmen |
| Language | C++14 (GCC 5.4.1) |
| Score | 1 |
| Code Size | 286 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 |