結果

問題 No.2555 Intriguing Triangle
ユーザー umezoumezo
提出日時 2023-12-01 01:04:06
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 887 bytes
コンパイル時間 11,835 ms
コンパイル使用メモリ 499,404 KB
実行使用メモリ 6,548 KB
最終ジャッジ日時 2023-12-01 13:40:56
合計ジャッジ時間 19,888 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

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 <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
namespace mp = boost::multiprecision;
using Bint = mp::cpp_int;
using Real = mp::number<mp::cpp_dec_float<1024>>;
 
#include<bits/stdc++.h>
using namespace std;

const Real EPS=1e-20;
 
int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  
  Real a,b,c;
  cin>>a>>b>>c;
  for(Real x=1;x<b+c-a-1;x++){
    for(Real y=1;y<b+c-a-1;y++){
      if(x+y+a>b+c-EPS) continue;
      Real 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