码迷,mamicode.com
首页 >  
搜索关键字:cmp    ( 878个结果
汇编 if else 例子
.text .global _start _start: mov r1,#1 mov r2,#2 cmp r1, r2 bgt branch1 add r3,r1,r2 b end branch1: sub r3,r1,r2 end: nop C 语言: if(a>b) a = a- b else ...
分类:其他好文   时间:2018-12-25 18:12:02    阅读次数:145
Python基础函数
1、绝对值abs() 2、比较大小函数cmp(x,y) x<y,返回-1;x==y,返回0;x>y,返回1 3、求和sum(L) 4、转换成字符串函数str(123) 》 '123' 5、转换成整数函数int('123') 》 123 6、自定义函数def 函数名(): 函数体 7、引入match包 ...
分类:编程语言   时间:2018-12-25 11:20:11    阅读次数:191
初始化函数的简单写法
struct seg { double l, r, h; int flag; seg() {} seg(double a,double b,double c,int d) : l(a), r(b), h(c), flag(d) {} bool operator < (const seg &cmp) ... ...
分类:其他好文   时间:2018-12-15 19:55:15    阅读次数:196
information_schema系列十一
information_schema系列十一 1: INNODB_CMP 和INNODB_CMP_RESET 这两个表存储的是关于压缩INNODB信息表的时候的相关信息, Column name Description PAGE_SIZE Compressed page size in bytes. ...
分类:其他好文   时间:2018-12-15 18:41:19    阅读次数:146
Leetcode-953 Verifying an Alien Dictionary(验证外星语词典)
1 string ooder; 2 bool cmp(const string &a,const string &b) 3 { 4 for(int i = 0;i & words, string order) 24 { 25 vector words2 = words; 26 ooder = ord... ...
分类:其他好文   时间:2018-12-09 13:58:08    阅读次数:316
python3-排序
排序>>>z=[11,34,-12,9,8534,12,434]>>>z.sort()>>>z[-12,9,11,12,34,434,8534]sort()函数用于对原列表进行排序,如果指定参数,则使用比较函数指定的比较函数。语法sort()方法语法:list.sort(cmp=None,key=None,reverse=False)参数参数c
分类:编程语言   时间:2018-12-04 18:55:22    阅读次数:239
算法第4章实践报告
算法第4章实践报告 实践题目 问题描述 算法描述 算法时间及空间复杂度分析(要有分析过程) #include<iostream>#include<algorithm>using namespace std;bool cmp(int a,int b){ return a<b;}int main(){ ...
分类:编程语言   时间:2018-12-02 19:19:34    阅读次数:170
python基础之内置函数与匿名函数
python基础之内置函数与匿名函数 内置函数68个如下图 重点的关注的内置函数len,sorted,enumerate,all,any,zip,filter,map,reversed,slice len(o):参数为O,返回数据类型的长度sorted(): sorted(iterable, cmp ...
分类:编程语言   时间:2018-11-27 10:11:36    阅读次数:209
[UVA-11039]Children's Game
解析 微扰法贪心经典题 代码 cpp include using namespace std; bool cmp(const string &x, const string &y) { return x + y y + x; } int main() { int n; while (~scanf(" ...
分类:其他好文   时间:2018-11-24 14:35:14    阅读次数:185
从零开始的Python学习 知识补充sorted
sorted()方法 sorted()可用于任何一个可迭代对象。 原型为sorted(iterable, cmp=None, key=None, reverse=False) iterable:一个可迭代对象; cmp:用于比较的函数,比较什么由key决定; key:用列表元素的某个属性或函数进行作 ...
分类:编程语言   时间:2018-11-18 22:39:07    阅读次数:205
878条   上一页 1 ... 13 14 15 16 17 ... 88 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!