結果

問題 No.2555 Intriguing Triangle
ユーザー ButterflvButterflv
提出日時 2023-12-01 00:52:47
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 523 bytes
コンパイル時間 164 ms
コンパイル使用メモリ 81,828 KB
実行使用メモリ 64,700 KB
最終ジャッジ日時 2023-12-01 13:40:05
合計ジャッジ時間 2,501 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import math

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

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