結果
| 問題 | 
                            No.2555 Intriguing Triangle
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2023-12-08 21:25:48 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 783 bytes | 
| コンパイル時間 | 1,505 ms | 
| コンパイル使用メモリ | 167,528 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-27 03:08:38 | 
| 合計ジャッジ時間 | 2,533 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 28 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
double eps=1e-10;
int32_t main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int a,b,c;cin>>a>>b>>c;
    for(int x=1;x<=200;++x)
    {
    for(int y=1;y<=200;++y)
    {
        int u=x+y+a;
        if(u<b+c && u+b>c && u+c>b)
        {
            double h1=((b*b+u*u-c*c+0.0)/(2*u*b));
            double h2=((c*c+u*u-b*b+0.0)/(2*u*c));
            double len1=sqrt(b*b+x*x-2*b*x*h1);
            double len2=sqrt(c*c+y*y-2*c*y*h2);
            double lx=(u*b*1.0)/(b+c);
            double ly=x+(a*len1*1.0)/(len1+len2);
            if(abs(lx-ly)<eps)
            {
                puts("Yes");
                return 0;
            }
        }
    }
    }
    puts("No");
    return 0;
}