X-man

导航

2013年7月16日 #

POJ 2398 Toy Storage

摘要: #include#include#includeusing namespace std;#define Max 2000using namespace std;struct Node{ int x,y;}point1[Max],point2[Max],high,low,tmp;int n,tm[Max],ans[Max];bool cmp(Node a,Node b){ if(a.x0) return 1; return 0;}int search(){ int l=0,r=n-1,mid; while(l>1; if(cal(poin... 阅读全文

posted @ 2013-07-16 21:34 雨钝风轻 阅读(221) 评论(0) 推荐(0) 编辑

POJ 2318 TOYS

摘要: #include#include#define Max 5010struct node{int x,y;}low[Max],high[Max];node a,b;int n,m;int cal(node aa,node bb,node cc){//return (cc.x-aa.x)*(bb.y-aa.y)-(cc.y-aa.y)*(bb.x-aa.x);//第一种return (bb.x-cc.x)*(aa.y-cc.y)-(bb.y-cc.y)*(aa.x-cc.x);//第二种}int solve(node cc){int l,r,mid;l=0;r=n-1;while(l>1;i 阅读全文

posted @ 2013-07-16 19:36 雨钝风轻 阅读(166) 评论(0) 推荐(0) 编辑