码迷,mamicode.com
首页 >  
搜索关键字:cmp    ( 878个结果
贪心/poj 1323 Game Prediction
1 #include 2 #include 3 #include 4 using namespace std; 5 int m,n,lose,x; 6 bool flag[1010],v[1010]; 7 bool cmp(int a,int b) 8 { 9 return a>b;10 ...
分类:其他好文   时间:2014-12-11 23:39:39    阅读次数:182
贪心/poj 2437 Muddy roads
1 #include 2 #include 3 #include 4 using namespace std; 5 struct node 6 { 7 int st,ed; 8 }; 9 node a[10010];10 11 int n,L,ans,pre;12 13 bool cmp(...
分类:其他好文   时间:2014-12-11 23:38:53    阅读次数:250
kruskal算法
#include #include #include using namespace std; struct edge { int begin; int end; int cost; }; bool cmp(edge a, edge b) { if (a.cost < b.cost) return true; return false; } int findSet(in...
分类:编程语言   时间:2014-12-08 09:21:00    阅读次数:202
hdu--5128--计算几何<算不上.暴力模拟> && hdu--5131--初级cmp
首先 给你N个点的坐标 你要找出其中的4个点来构造矩形可以选择4个点 或者 一条对角线来进行构造4个点 需要写个4层for 对角线只要2层for相比下 还是对角线比较好虽然 我们会重复构造相同的矩形出来 但是没关系 题目数据很小的接下来 就是矩形是否相交的判断了注意一种特殊情况 矩阵 I 内含与 矩...
分类:其他好文   时间:2014-12-04 22:50:51    阅读次数:336
Android回调机制的理解
定义: 所谓回调就是说一个程序里面有一个函数a,我在这个程序里面调用b函数,我希望b函数来调用我的a函数,这个a函数就叫做回调函数。(网上看了好久才明白0-0) C++对回调的实现: 比如说我在程序里面调用qsort(a,a+n,cmp)这该快排函数,其中a是数组,n是数组元素的个数,而cmp函数是自己的程序里面定义的。我想让qsort来调用我的cmp函数,就要吧cmp函数指针传给qsort...
分类:移动开发   时间:2014-12-01 20:56:28    阅读次数:204
任意N个数的子集生成算法
第一种方法: #include #include #include #include using namespace std; int q[100]; int w[100]; int cmp(int a,int b) { return a<b; } void subset(int cur,int end) { int i; for(i=0;i<cur;i++) ...
分类:编程语言   时间:2014-11-30 16:59:46    阅读次数:224
【强联通分量缩点】【最短路】【spfa】bzoj1179 [Apio2009]Atm
缩点后转化成 DAG图上的单源最长路问题。spfa/dp随便。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 int cmp[500001],sum,n,m,Us[500001],Vs[...
分类:移动开发   时间:2014-11-30 14:01:07    阅读次数:226
控制器中获取store
在Controller中要获取View中的选中值我用[javascript] view plaincopyprint?var cmp = Ext.ComponentQuery.query('weldlist')[0].getSelectionModel(); 可是当我需要获取View中...
分类:其他好文   时间:2014-11-26 16:25:27    阅读次数:255
《网络协议》ICMP 协议
CMP 经常被认为是 IP 层的一个组成部分,它传递差错报文以及其他需要注意的信息。ICMP 报文通常被 IP 层或更高层协议(TCP 或 UDP)使用。ICMP 报文是在 IP 数据报内部传输的。IP 协议是不可靠协议,不能保证 IP 数据报能够成功的到达目的主机,无法进行差错控制,而 ICMP 协议能够协助 IP 协议完成这些功能。...
分类:其他好文   时间:2014-11-26 11:20:10    阅读次数:223
uva--10720Graph Construction +Havel--Hakimi定理
这是一个定理题;定理的具体内容见:http://blog.csdn.net/shuangde800/article/details/7857246 我的代码如下: #include #include #include #include using namespace std; int cmp(int a,int b) { return a>b; } int main...
分类:其他好文   时间:2014-11-25 23:39:23    阅读次数:220
878条   上一页 1 ... 72 73 74 75 76 ... 88 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!