Logo
(追記) (追記ここまで)

24933번 - Quadratic Dissonance 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB44292769.231%

문제

Oh no! Both you and your lab partner forgot to complete one part of the latest assignment and it is due in an hour!

The purpose of this lab assignment was to have you analyze some experimental data, find a quadratic function that best describes the data, and report the minimum value that can be taken by this quadratic.

Both you and your partner have tried this part on your own, in order to double-check your answers. Unfortunately, you both found different quadratic functions!

You don’t have time to repeat the experiment. To try and maximize your chances of reporting a value that is close to the minimum (i.e. to get partial credit), you decide to find a value $x$ that minimizes the maximum of your two quadratic functions.

More precisely, your task is the following. Given two quadratic functions $f(x)=x^2+A⋅x+B$ and $g(x)=x^2+C⋅x+D$ (here $A,B,C,D$ will be given values), you should find a value $x^∗$ minimizing the maximum of these two functions. That is, $x^∗$ should be chosen to minimize the function $h(x)=\max{\{f(x),g(x)\}}$.

입력

Input consists of a single line containing four integers $A,B,C,D,ドル each lying in the range $[-1000,1000]$.

출력

Display two values $x^∗,h(x^∗)$ on a single line where $x^∗$ is the point that minimizes the function $h(x)=\max{\{x^2+A⋅x+B,x^2+C⋅x+D\}}$.

Your answer will be accepted if both values are within an absolute or relative error of 10ドル^{-4}$ of the correct answer.

제한

예제 입력 1

1 0 0 1

예제 출력 1

0 1

예제 입력 2

2 -1 0 -2

예제 출력 2

-0.5 -1.75

예제 입력 3

3 1 3 -2

예제 출력 3

-1.5 -1.25

예제 입력 4

2 2 2 2

예제 출력 4

-1 1

예제 입력 5

25 -73 -23 41

예제 출력 5

2.375 -7.984375

힌트

출처

University > University of Alberta Programming Contest > UAPC 2022 > Division 1 H번

University > University of Alberta Programming Contest > UAPC 2022 > Division 2 H번

  • 문제를 만든 사람: Zachary Friggstad
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /