結果
問題 | No.2555 Intriguing Triangle |
ユーザー |
|
提出日時 | 2023-12-01 13:21:49 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 465 bytes |
コンパイル時間 | 2,010 ms |
コンパイル使用メモリ | 194,028 KB |
最終ジャッジ日時 | 2025-02-18 02:55:01 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 28 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int64_t a,b,c; cin>>a>>b>>c; int m=b+c-a; for(int i=1;i<(m-1);i++){ for(int j=1;j<(m-i);j++){ int64_t n=a+i+j; int64_t cosc=(c*c+n*n-b*b); int64_t y=2*c*n*(c*c+(a+j)*(a+j))-2*c*(a+j)*cosc; int64_t x=2*c*n*(c*c+j*j)-2*c*j*cosc; int64_t s=j*b*j*b*y; int64_t t=i*i*c*c*x; if(s==t && b<n+c && c<n+b){ cout<<"Yes"<<endl; return 0; } } } cout<<"No"<<endl; return 0; }