manikiran949's blog

By manikiran949, history, 20 months ago, In English

https://codeforces.me/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 !

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
20 months ago, # |
  Vote: I like it 0 Vote: I do not like it

(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.