On Sat, Jun 05, 2010 at 02:05:25PM -0700, Reinier Zwitserloot wrote: > I'm really kicking myself for deciding to try and finish C-large which > failed, I should have spent the time to read D fully, realize the D- > small is just asking to calculate the intersection of 2 circles 10,000 > times, which is completely trivial - just google around for the > formula if you can't derive it yourself.
I considered this, but I didn't attempt it because I was feeling too much time pressure. The derivations I found online seemed to consider only small intersections, not one where most of one circle lies inside the other. Like this derivation: http://mathforum.org/library/drmath/view/54785.html Can someone tell me if it would have worked, so I can kick myself too? :) > There's one big intuitive leap you'd have to make which I'm not 100% > sure about, and it is this: > > Given the square box drawn by [x1,y1] to [x2,y2], then this entire box > lies inside of A if points [x1,y1], [x1,y2], [x2,y1] and [x2,y2] are > ALL inside A. Similarly, the entire box lies outside of A if all those > points lie outside of A. I think the first assumption holds but not the second. For a simple counterexample, consider a rectangle that contains all of A. Also look at the left-side pictures in the problem description, where A is an elongated shape. One point of that shape could intrude in the side of a rectangle without touching any of the corners. So, I don't think this works unless you have some other way of ruling out the rectangles that lie outside of A. -- Richard Braakman We can achieve more by promoting generosity, awareness, and freedom than we can by vainly kicking at a buttless foe. -- VHEMT -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.
