結果
問題 | No.1064 ∪∩∩ / Cup Cap Cap |
ユーザー |
|
提出日時 | 2020-06-02 07:30:11 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 35 ms / 2,000 ms |
コード長 | 384 bytes |
コンパイル時間 | 123 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-23 18:17:15 |
合計ジャッジ時間 | 3,008 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 36 |
ソースコード
from math import sqrt def f(x): return x ** 2 + a * x + b a, b, c, d = map(int, input().split()) tmp = (a - c) ** 2 - 8 * (b - d) if tmp > 0: x1 = (c - a) + sqrt(tmp) x1 /= 4 x2 = (c - a) - sqrt(tmp) x2 /= 4 y1 = f(x1) y2 = f(x2) p = (y1 - y2) / (x1 - x2) q = y1 - p * x1 print(p, q) elif tmp == 0: print("Yes") else: print("No")