摘要: Fence RailsBurch, Kolstad, and SchrijversFarmer John is trying to erect a fence around part of his field. He has decided on the shape of the fence and has even already installed the posts, but he's having a problem with the rails. The local lumber store has dropped off boards of varying lengths; 阅读全文
posted @ 2013-03-01 12:30 J.Z's World 阅读(351) 评论(0) 推荐(0) 编辑
摘要: Beef McNuggetsHubert ChenFarmer Brown's cows are up in arms, having heard that McDonalds is considering the introduction of a new product: Beef McNuggets. The cows are trying to find any possible way to put such a product in a negative light.One strategy the cows are pursuing is that of `inferio 阅读全文
posted @ 2013-03-01 12:29 J.Z's World 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 这道题断断续续做了有两三天了,真纠结。写下分析:%%第一问好解,用线段相交的判断就好:满足条件1 && 条件21.以线段为对角线的长方形要相交2.两对端点互相跨立设这四个点为x1,y1,x2,y2,x3,y3,x4,y4L1的坐标为t1=x1-x2,w1=y1-y2,1端点到3,4的线段向量分别为t2=x1-x3,w2=y1-y3,t3=x1-x4,w3=y1-y4;则3,4在L1两端即为(t1*w2-t2*w1)*(t1*w3-t3*w1)<=0 (等于0的情况发生在重合的情况下。在满足了第一个条件之后,这里的等号可以去掉了)%%第二问就没那么容易想了:当一条边可以被看 阅读全文
posted @ 2013-03-01 12:27 J.Z's World 阅读(452) 评论(0) 推荐(0) 编辑