摘要:
叉积+二分通过叉积来判断点在线段的某侧,找到在点右侧的最左边的边,即可判断点在第几个格子内,可以通过二分来优化查询速度#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
const int maxn=1000+10;
int n,m,x1,y1,x2,y2;
struct segment
{ int loc1,loc2;
};
segment s[maxn];
int c[maxn],res[maxn];
bool cmp(segment a,segm 阅读全文
posted @ 2013-02-28 19:55
LJ_COME!!!!!
阅读(124)
评论(0)
推荐(0)

浙公网安备 33010602011771号