摘要: 二分#include <iostream> using namespace std; const int maxn=5010; int Ui[maxn],Li[maxn],dx[maxn],dy; int amount[maxn]; int m,n,x1,y1,x2,y2; int bsearch(int xj,int yj) { int low=-1,high=m,mid; while(high-low>1) { mid=(high+low)/2; if((dy*(xj-Ui[mid])-dx[mid]*(yj-y1))<0) high=mid; else lo... 阅读全文
posted @ 2012-09-22 16:00 lishimin_come 阅读(110) 评论(0) 推荐(0) 编辑