码迷,mamicode.com
首页 >  
搜索关键字:cmp    ( 878个结果
poj 1456 Supermarket (贪心+并查集)
# include # include # include using namespace std; int fa[10010]; struct node { int p; int d; }; struct node a[10010]; bool cmp(node a1,node a2)//利润从大到小 { return a1.p>a2.p; } int find(int x) {...
分类:其他好文   时间:2014-08-03 10:16:25    阅读次数:208
比较大小 汇编
AREA EXAMPLE2,CODE,READONLY ENTRY CODE 32 CMPA LDR R0,=0X30007000 LDR R1,[R0] LDR R2,[R0+4] CMP R1,R2 BH1 NEXT2 STR R2,[R0] STR R1,[R0+4] NEXT1 LDR R1,[R0+4] LDR R2,[R0+8] CMP R1,R...
分类:其他好文   时间:2014-08-03 10:15:35    阅读次数:193
zju 1188 DNA Sorting
#include#include#includeusing namespace std;struct node{ int a; char s[105]; }p[105];int cmp(node c,node b){ return c.a #include #inclu...
分类:其他好文   时间:2014-08-02 01:42:32    阅读次数:246
poj 1007 DNA Sorting
错误#include#include#includeusing namespace std;struct node { int a; char s[1000]; }p[1000];int cmp(node c,node b){ return c.ap[k].s[j]) p[k].a++; ...
分类:其他好文   时间:2014-08-02 01:37:12    阅读次数:212
测试赛D - The War(有控制范围的贪心)
#include #include #include using namespace std; struct node{ int x , y ; } p[2600]; int q[1200] ; bool cmp(node a,node b) { return a.y < b.y || ( a.y == b.y && a.x < b.x ) ; } int main() {...
分类:其他好文   时间:2014-07-30 17:44:44    阅读次数:219
hdu 4883 TIANKENG’s restaurant
//暴搜 # include # include # include using namespace std; struct node { int b; int e; int num; }; struct node a[10010]; int cmp(node a1,node a2) { return a1.b<a2.b; } int main() {...
分类:其他好文   时间:2014-07-29 14:48:08    阅读次数:158
Excuses, Excuses! UVA 409
#include #include #include int get_word(int); void convert_word(); int str_cmp(); char key[100][100];//保存关键词 char word[100];//保存从excuse中提取出来的词 char exc[100][100];//保存excuses int cnt[100];//记录每个ex...
分类:其他好文   时间:2014-07-29 14:41:50    阅读次数:197
HNU 12845 Ballot Analyzing Device
#include using namespace std; struct vote{ int x; string s; }v[20]; bool cmp(vote a,vote b) { return a.x>b.x; } int main() { int n,m; string str; scanf("%d%d",&n,&m); for(i...
分类:其他好文   时间:2014-07-29 13:07:57    阅读次数:170
贪心算法解决加油站选择问题(未解决)
//贪心算法解决加油站选择问题//# include# includeusing namespace std;# includestruct Node{ float p, d;};bool cmp(Node a, Node b){ return a.d > Cmax >> D >> Da...
分类:其他好文   时间:2014-07-29 11:36:46    阅读次数:268
poj 1328 Radar Installation (贪心)
# include # include # include # include using namespace std; struct point { double left,right; }p[2010],temp; bool cmp(point a,point b) { return a.left<b.left; } int main() { int n,i,count,fla...
分类:其他好文   时间:2014-07-28 16:20:33    阅读次数:208
878条   上一页 1 ... 80 81 82 83 84 ... 88 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!