結果

問題 No.1381 Simple Geometry 1
ユーザー 蜜蜂
提出日時 2021-02-06 23:59:55
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 407 bytes
コンパイル時間 1,449 ms
コンパイル使用メモリ 166,688 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-03 12:25:08
合計ジャッジ時間 2,341 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 28 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ld = long double;
#define fi first
#define se second
#define pb push_back

int main(){
  ld x,y,z,w;
  cin>>x>>y>>z>>w;
  
  ld maxw=sqrt(y*y+(x/y)*(x/y))-sqrt(y*y+z*z);
  ld minw=sqrt(y*y+z*z)-sqrt(z*z+(x/y)*(x/y));
  if(w<minw||maxw<w){
    cout<<"WARNING"<<endl;
  }
  
  cout<<fixed<<setprecision(10);
  cout<<(x-y*z)/2<<endl;
}
0