結果
| 問題 | No.2555 Intriguing Triangle | 
| コンテスト | |
| ユーザー |  umezo | 
| 提出日時 | 2023-12-01 00:26:10 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 704 bytes | 
| コンパイル時間 | 1,976 ms | 
| コンパイル使用メモリ | 192,820 KB | 
| 最終ジャッジ日時 | 2025-02-18 02:40:23 | 
| ジャッジサーバーID (参考情報) | judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 20 WA * 8 | 
ソースコード
#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-9;
 
int main(){
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  
  ll a,b,c;
  cin>>a>>b>>c;
  for(ll x=1;x<b+c-a-1;x++){
    for(ll y=1;y<b+c-a-1;y++){
      if(x+y+a>=b+c) continue;
      double e,f;
      e=(double)sqrt((a+y)*(a+y)+c*c-(double)(a+y)*(c*c+(x+y+a)*(x+y+a)-b*b)/(x+y+a));
      f=(double)sqrt((a+x)*(a+x)+b*b-(double)(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;
}
            
            
            
        