Блог пользователя manikiran949

Автор manikiran949, история, 14 месяцев назад, По-английски

https://mirror.codeforces.com/contest/1805/submission/200457291 I have been trying to find where it fails , but i could not figure it out. My approach: i have considered 5 extreme cases: k=slope. 1) maximum postive slope. 2) minimum positive slope. 3) Maximum negative slope. 4) minimum negative slope. 5) zero slope. If a line exists such that it does not intersect or touch a parabola ,then an equation with one of the above slope satisfy the given property. Then , Kx=ax^2+bx+c. Roots must be imaginary of the above equation. Hence discriminant must be less than zero.

Please let me know anything is wrong here.

Thank You !

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
14 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

(b-k)^2 — 4*a*c<0; This results into the simplification that K> b^2-2sqrt(ac) and K< b^2+2sqrt(ac) Sort the initial array of Ks and binary search for the relevant indexes.