結果
| 問題 | No.1064 ∪∩∩ / Cup Cap Cap | 
| コンテスト | |
| ユーザー |  uni_python | 
| 提出日時 | 2020-09-02 23:15:25 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 39 ms / 2,000 ms | 
| コード長 | 540 bytes | 
| コンパイル時間 | 246 ms | 
| コンパイル使用メモリ | 82,452 KB | 
| 実行使用メモリ | 52,608 KB | 
| 最終ジャッジ日時 | 2024-11-22 00:46:55 | 
| 合計ジャッジ時間 | 3,081 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 36 | 
ソースコード
import sys
input=sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def main():
    mod=10**9+7
    a,b,c,d=MI()
    
    D= (a-c)**2 - 4*2*(b-d)
    
    if D==0:
        print("Yes")
    elif D<0:
        print("No")
    else:
        x1=(-(a-c)+D**0.5)/4
        x2=(-(a-c)-D**0.5)/4
        
        y1=x1**2 + a*x1 + b
        y2=x2**2 + a*x2 + b
        
        p=(y2-y1)/(x2-x1)
        q=y1-p*x1
        
        print(p,q)
        
main()
            
            
            
        