結果
| 問題 | 
                            No.2555 Intriguing Triangle
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Rubikun
                         | 
                    
| 提出日時 | 2023-12-01 00:10:01 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 3 ms / 2,000 ms | 
| コード長 | 1,318 bytes | 
| コンパイル時間 | 2,242 ms | 
| コンパイル使用メモリ | 194,880 KB | 
| 最終ジャッジ日時 | 2025-02-18 02:35:33 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 28 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define mp make_pair
#define si(x) int(x.size())
const int mod=998244353,MAX=300005,INF=1<<30;
int main(){
    
    std::ifstream in("text.txt");
    std::cin.rdbuf(in.rdbuf());
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    ll a,b,c;cin>>a>>b>>c;
    for(ll x=1;x<=100;x++){
        for(ll y=1;y<=100;y++){
            ll s=b,t=c,u=x+a+y;
            if(s+t>u&&t+u>s&&u+s>t){
                double tt=acos((double)(t*t+u*u-s*s)/(2.0*u*t)),ss=acos((double)(u*u+s*s-t*t)/(2.0*u*s));
                
                //cout<<ss<<" "<<tt<<endl;
                double da=sqrt(x*x+b*b-2.0*x*b*cos(ss)),ea=sqrt(y*y+c*c-2.0*y*c*cos(tt));
                
                double p=acos((da*da+b*b-x*x)/(2.0*da*b)),q=acos((ea*ea+c*c-y*y)/(2.0*ea*c));
                
                //cout<<p<<" "<<q<<endl;
                if(abs(p-q)<1e-8){
                    cout<<"Yes\n";
                    return 0;
                }
            }
        }
    }
    
    cout<<"No\n";
}
            
            
            
        
            
Rubikun