結果

問題 No.2555 Intriguing Triangle
ユーザー ニックネームニックネーム
提出日時 2023-12-01 00:53:16
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 516 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 99,288 KB
最終ジャッジ日時 2023-12-01 13:40:28
合計ジャッジ時間 21,381 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
85,976 KB
testcase_01 AC 420 ms
83,384 KB
testcase_02 AC 322 ms
82,116 KB
testcase_03 AC 421 ms
82,884 KB
testcase_04 AC 719 ms
85,928 KB
testcase_05 AC 144 ms
81,092 KB
testcase_06 AC 126 ms
80,324 KB
testcase_07 AC 180 ms
81,348 KB
testcase_08 AC 267 ms
81,988 KB
testcase_09 AC 938 ms
84,676 KB
testcase_10 WA -
testcase_11 AC 1,926 ms
91,708 KB
testcase_12 TLE -
testcase_13 AC 1,845 ms
91,364 KB
testcase_14 TLE -
testcase_15 AC 1,238 ms
89,028 KB
testcase_16 AC 971 ms
84,420 KB
testcase_17 AC 134 ms
79,172 KB
testcase_18 AC 656 ms
84,804 KB
testcase_19 AC 167 ms
81,220 KB
testcase_20 TLE -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import Decimal
de,ab,ac = Decimal(input()),Decimal(input()),Decimal(input())
f = False
for bd in range(1,int(ab+ac-de)):
    for ec in range(1,int(ab+ac-de)-bd):
        bd = Decimal(bd); ec = Decimal(ec); bc = bd+de+ec
        if ab+bc<=ac or ac+bc<=ab: continue
        ad = (ab*ab+bd*bd-(ab*ab+bc*bc-ac*ac)*bd/bc)**Decimal("0.5")
        ae = (ac*ac+ec*ec-(ac*ac+bc*bc-ab*ab)*ec/bc)**Decimal("0.5")
        if (ab*ab+ad*ad-bd*bd)*ac*ae==(ac*ac+ae*ae-ec*ec)*ab*ad: f = True
print("Yes" if f else "No")
0