Quoting fooler <[EMAIL PROTECTED]>: > doc :-> actually two liner here.. one line for the value > of X and one line for the value of Y... but i still consider > this as one liner :-> > here is the formula to find the coordinate of angle bisectors > of a given triangle for problem E: > > (1) X = (a * x1 + b * x2 + c * x3) / (a + b + c) > (2) Y = (a * y1 + b * y2 + c * y3) / (a + b + c) > > where: > > (3) a = sqrt( (x3 - x2) ^ 2 + (y3 -y2) ^ 2 ) > (4) b = sqrt( (x3 - x1) ^ 2 + (y3 - y1) ^ 2) > (5) c = sqrt( (x2 - x1) ^ 2 + (y2 - y1) ^ 2)
This looks like the center of mass computation, and it works! Unfortunately, if you actually wrote the complete program according to the program specations given during the contest, a copy of which you have, you need about 55 lines of code -- definitely not a one liner. > problem because this kind of a problem is too easy for an > engineering student or a bs math student :-> You say it is too easy because you solved the problem in the comfort of your home, with all the knowledge resources around you. You were not in a contest environment under time pressure. In a contest, you had to derive your own formulas, if you don't know them in the first place. In your case, you could just google "formula for incenter" and instantly you get, http://jwilson.coe.uga.edu/EMT668/EMAT6680.2003.Su/Shea/ assign4js/incenter.html How many BS Math students that you know you are sure can recall this formula from memory? In my case, I had to derive the formula myself, and I took two pages of scratch work and a diagram, and got an acceptable formula that actually works, but much less elegant than what Google gives. I invite you to join the ACM contest, maybe as a graduate student. There you can prove in deed, and not in words, what you so boldly expound here. And maybe, a Filipino team, with you in it, can join the World Finals. So far, no Filipino team has ever reached the World Finals, yet. Pablo Manalastas -- Philippine Linux Users' Group (PLUG) Mailing List [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
