結果
| 問題 |
No.1064 ∪∩∩ / Cup Cap Cap
|
| ユーザー |
kit84
|
| 提出日時 | 2020-05-29 23:05:07 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 2,000 ms |
| コード長 | 549 bytes |
| コンパイル時間 | 325 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-06 07:26:37 |
| 合計ジャッジ時間 | 2,562 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 36 |
ソースコード
import sys
input = sys.stdin.readline
def linput(tt=int):
return list(map(tt,input().split()))
def gcd(a: int, b: int):
while b: a, b = b, a%b
return a
def lcm(a: int, b: int):
return a * b // gcd(a, b)
def main():
a,b,c,d = linput()
t = a*a-2*a*c-8*b+c*c+8*d
if t<0: res = "No"
elif t==0: res = "Yes"
else:
rt = t**.5
dx = rt/2
dy = (a+c)*rt/4
p = dy/dx if dx else 0
xx = (c-a-rt)/4
yy = -(a+c)*rt - a*a+4*b+c*c+4*d
q = -p * xx + yy/8
res = "{:.12f} {:.12f}".format(p,q)
print(res)
if __name__ == "__main__":
main()
kit84