結果

問題 No.1064 ∪∩∩ / Cup Cap Cap
ユーザー zaki_chemtechzaki_chemtech
提出日時 2020-07-13 16:16:19
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 331 bytes
コンパイル時間 1,072 ms
コンパイル使用メモリ 86,576 KB
実行使用メモリ 71,784 KB
最終ジャッジ日時 2023-08-07 15:11:10
合計ジャッジ時間 5,255 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,616 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 70 ms
71,056 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 71 ms
71,260 KB
testcase_15 AC 71 ms
71,720 KB
testcase_16 AC 70 ms
71,604 KB
testcase_17 AC 71 ms
71,056 KB
testcase_18 AC 72 ms
71,716 KB
testcase_19 AC 69 ms
71,784 KB
testcase_20 AC 70 ms
71,344 KB
testcase_21 AC 71 ms
71,048 KB
testcase_22 AC 72 ms
71,736 KB
testcase_23 AC 72 ms
71,032 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 69 ms
71,604 KB
testcase_36 AC 70 ms
71,696 KB
testcase_37 WA -
testcase_38 AC 70 ms
71,340 KB
testcase_39 AC 72 ms
71,536 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c,d = map(int,input().split())

x_1 = (-1*(a-c)+((a-c)**2-4*2*(b-d))**0.5)/4
x_2 = (-1*(a-c)-((a-c)**2-4*2*(b-d))**0.5)/4

if isinstance(x_1, complex):
    print('NO')
elif x_1 == x_2:
    print('YES')
else:
    y_1 = x_1**2 + a*x_1 + b
    y_2 = x_2**2 + a*x_2 + b
    p = (y_2-y_1)/(x_2-x_1)
    q = y_1-p*x_1
    print(p, q)
0