結果
| 問題 | No.1064 ∪∩∩ / Cup Cap Cap | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-05-29 23:02:51 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 31 ms / 2,000 ms | 
| コード長 | 407 bytes | 
| コンパイル時間 | 319 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 11,008 KB | 
| 最終ジャッジ日時 | 2024-11-06 07:21:28 | 
| 合計ジャッジ時間 | 2,790 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 36 | 
ソースコード
a,b,c,d = map(int, input().split())
import math
D = (a-c)**2 - 8*(b-d)
def c1(x):
    return x**2 + a*x + b
def c2(x):
    return x**2 + c*x + d
if D < 0:
    print('No')
elif D == 0:
    print('Yes')
else:
    x1 = (-(a-c) - math.sqrt(D))/4
    x2 = (-(a-c) + math.sqrt(D))/4
    dash = (c1(x2)-c1(x1))/(math.sqrt(D)/2)
    sep = -dash * x1 + c1(x1)
    # print(D,x1,x2,dash,sep)
    print(dash, sep)
            
            
            
        