結果
| 問題 | No.2555 Intriguing Triangle |
| コンテスト | |
| ユーザー |
ニックネーム
|
| 提出日時 | 2023-12-01 00:34:25 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 542 bytes |
| 記録 | |
| コンパイル時間 | 508 ms |
| コンパイル使用メモリ | 21,340 KB |
| 実行使用メモリ | 16,172 KB |
| 最終ジャッジ日時 | 2026-09-04 23:47:47 |
| 合計ジャッジ時間 | 14,727 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 WA * 9 TLE * 2 |
ソースコード
from decimal import Decimal
de,ab,ac = int(input()),int(input()),int(input())
de2,ab2,ac2 = Decimal(de**2),Decimal(ab**2),Decimal(ac**2)
f = False
for bd in range(1,ab+ac-de):
for ec in range(1,ab+ac-de-bd):
bc = bd+de+ec; bd2,ec2,bc2 = Decimal(bd**2),Decimal(ec**2),Decimal(bc**2)
ad = (ab2+bd2-(ab2+bc2-ac2)*Decimal(bd)/Decimal(bc))**Decimal("0.5")
ae = (ac2+ec2-(ac2+bc2-ab2)*Decimal(ec)/Decimal(bc))**Decimal("0.5")
if (ab2+ad*ad-bd2)*ac*ae==(ac2+ae*ae-ec2)*ab*ad: f = True
print("Yes" if f else "No")
ニックネーム