結果

問題 No.2555 Intriguing Triangle
ユーザー ButterflvButterflv
提出日時 2023-12-01 22:07:10
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 592 bytes
コンパイル時間 272 ms
コンパイル使用メモリ 81,828 KB
実行使用メモリ 64,692 KB
最終ジャッジ日時 2023-12-01 22:07:13
合計ジャッジ時間 3,014 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,716 KB
testcase_01 AC 38 ms
53,844 KB
testcase_02 AC 39 ms
53,844 KB
testcase_03 AC 38 ms
53,844 KB
testcase_04 AC 44 ms
53,844 KB
testcase_05 WA -
testcase_06 AC 37 ms
53,844 KB
testcase_07 AC 36 ms
53,844 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 48 ms
62,548 KB
testcase_12 AC 51 ms
64,688 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 47 ms
62,548 KB
testcase_16 AC 41 ms
55,992 KB
testcase_17 AC 37 ms
53,716 KB
testcase_18 AC 39 ms
53,844 KB
testcase_19 AC 37 ms
53,844 KB
testcase_20 AC 50 ms
64,688 KB
testcase_21 AC 49 ms
64,692 KB
testcase_22 AC 36 ms
53,844 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 43 ms
55,992 KB
testcase_27 AC 48 ms
62,548 KB
testcase_28 AC 36 ms
53,844 KB
testcase_29 AC 47 ms
62,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

a, b, c=int(input()), int(input()), int(input())
di=b+c-a
err=10**(-14)
flag=True

if (a>(b+c)) or (b>(c+a)) or (c>(a+b)):
  print("No")
  flag=False

for i in range(2, di):
  par=i-1
  for j in range(par):
    AB, AC, BD, DE, EC=b, c, 1+j, a, i-j-1
    BC, BE, DC=BD+DE+EC, BD+DE, DE+EC
    AD=math.sqrt((AB**2*DC+AC**2*BD-BC*BD*DC)/(BC))
    AE=math.sqrt((AB**2*EC+AC**2*BE-BC*BE*EC)/(BC))
    cos_BAD=(AB**2+AD**2-BD**2)/(2*AB*AD)
    cos_EAC=(AE**2+AC**2-EC**2)/(2*AE*AC)
    if abs(cos_BAD-cos_EAC)<=err and flag:
      print("Yes")
      flag=False

if flag:
  print("No")
0