結果

問題 No.2555 Intriguing Triangle
ユーザー umezoumezo
提出日時 2023-12-01 01:10:19
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 680 bytes
コンパイル時間 2,060 ms
コンパイル使用メモリ 201,276 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2023-12-01 13:40:43
合計ジャッジ時間 3,206 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 2 ms
6,676 KB
testcase_06 AC 2 ms
6,676 KB
testcase_07 AC 2 ms
6,676 KB
testcase_08 AC 2 ms
6,676 KB
testcase_09 AC 2 ms
6,676 KB
testcase_10 AC 2 ms
6,676 KB
testcase_11 AC 2 ms
6,676 KB
testcase_12 AC 2 ms
6,676 KB
testcase_13 AC 2 ms
6,676 KB
testcase_14 AC 2 ms
6,676 KB
testcase_15 AC 2 ms
6,676 KB
testcase_16 AC 2 ms
6,676 KB
testcase_17 AC 2 ms
6,676 KB
testcase_18 WA -
testcase_19 AC 2 ms
6,676 KB
testcase_20 AC 2 ms
6,676 KB
testcase_21 AC 3 ms
6,676 KB
testcase_22 WA -
testcase_23 AC 2 ms
6,676 KB
testcase_24 AC 2 ms
6,676 KB
testcase_25 AC 2 ms
6,676 KB
testcase_26 AC 2 ms
6,676 KB
testcase_27 AC 2 ms
6,676 KB
testcase_28 AC 2 ms
6,676 KB
testcase_29 AC 1 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(v) v.begin(),v.end()
typedef long long ll;
 
#include<bits/stdc++.h>
using namespace std;

const double EPS=1e-2;
 
int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  
  double a,b,c;
  cin>>a>>b>>c;
  for(double x=1;x<b+c-a;x++){
    for(double y=1;y<b+c-a;y++){
      if(x+y+a>=b+c) continue;
      double e,f;
      e=sqrt((a+y)*(a+y)+c*c-(a+y)*(c*c+(x+y+a)*(x+y+a)-b*b)/(x+y+a));
      f=sqrt((a+x)*(a+x)+b*b-(a+x)*(b*b+(x+y+a)*(x+y+a)-c*c)/(x+y+a));
      if(abs(c*f*(b*b+e*e-x*x)-b*e*(c*c+f*f-y*y))<EPS){
        cout<<"Yes\n";
        return 0;
      }
    }
  }
  cout<<"No\n";
    
  return 0;
}
0