zarif98sjs / blog

0 stars 0 forks source link

blog/blog/lightoj1043/ #16

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

LightOj 1043 (Triangle Partitioning) :: Convoluted Mess — Md. Zarif Ul Alam

Idea 1 Binary Search AB/AD = AC/AE = BC/DE So , AE = (ACAD)/AB and , DE = (BCAD)/AB The area ratio of those two triangles can be calculated as a function of AD . So, we can Binary Search over AD Idea 2 Geometry AB/AD = AC/AE = BC/DE We know that , If two triangles are similar, then the ratio of the area of both triangles is proportional to the square of the ratio of their corresponding sides.

https://zarif98sjs.github.io/blog/blog/lightoj1043/

eyenine commented 2 years ago

Hi,I hope you don't mind if I ask a question here.From idea 1(Binary search solution) you use for loop 0 to 100.can you please explain why you use 0 to 100? Thanks BTW nice explanation written.