码迷,mamicode.com
首页 >  
搜索关键字:poj 3348 cows    ( 21218个结果
poj 2653 计算几何
1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 struct point { 8 double x,y; 9 };10 point be[100005],en[100...
分类:其他好文   时间:2014-05-13 20:03:30    阅读次数:288
poj 3258 River Hopscotch 二分
1 /** 2 大意:给定n个点,删除其中的m个点,其中两点之间距离最小的最大值 3 思路: 二分最小值的最大值---〉t,若有距离小于t,则可以将前面的节点删除;若节点大于t,则继续往下查看 4 若删除的节点大于m,说明t,过于大,需要减小;若删除的节点小于m说明t过于小了,...
分类:其他好文   时间:2014-05-13 20:02:30    阅读次数:232
poj 3487 稳定婚姻
1 /** 2 稳定婚姻:男生不停的求婚,女生不停地拒绝 3 **/ 4 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 #define maxn 4011 int pref[maxn][...
分类:其他好文   时间:2014-05-13 20:01:27    阅读次数:360
poj-1426(转)
大致题意:给出一个整数n,(1 int n,flat;unsigned long long b;void DFS(unsigned long long a,int step){ if(flat||step==19) { return ; } if(a%n==0)...
分类:其他好文   时间:2014-05-13 19:59:23    阅读次数:276
poj 3304 计算几何
大意:是否存在一条直线,使所有线段在直线上的投影至少交与一点 思路:转换为是否存在一条直线与所有的线段相交,做这条直线的垂线,那么垂线即为所求 3 **/ 4 #include 5 #include 6 using namespace std; 7 int n; 8 const double...
分类:其他好文   时间:2014-05-13 19:55:23    阅读次数:234
poj 2689 大范围内素数筛选
1 /** 2 给定一定范围求其内的素数 3 4 注意: 5 **/ 6 7 #include 8 #include 9 #include 10 using namespace std;11 #define maxn 100000012 long long prime[500000];1...
分类:其他好文   时间:2014-05-13 19:50:13    阅读次数:242
poj 1410 计算几何
1 /** 2 注意: 千万得小心。。就因为一个分号,调了一个晚上。。。 3 **/ 4 #include 5 #include 6 using namespace std; 7 struct point { 8 int x,y; 9 }; 10 11 struct...
分类:其他好文   时间:2014-05-13 19:43:02    阅读次数:275
poj 2417
1 Accepted 8508K 391MS C++ 2004B 2 相比下边,,优化太多太多了。。。 3 /** 4 baby-step-giant-step 因为数据量太大,,自己写hash 5 6 **/ 7 #include 8 #include...
分类:其他好文   时间:2014-05-13 19:27:32    阅读次数:363
POJ 3017 单调队列dp
Cut the Sequence Time Limit: 2000MS   Memory Limit: 131072K Total Submissions: 8764   Accepted: 2576 Description Given an integer sequence { an } of length N, you are to ...
分类:其他好文   时间:2014-05-13 16:04:29    阅读次数:267
POJ3067:Japan(线段树)
Description Japan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the East coast and M cities on the West coast (M <= ...
分类:其他好文   时间:2014-05-13 14:53:40    阅读次数:189
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!